Skip to content

Commit

Permalink
fix: modify anonymous struct to correctly parse http response
Browse files Browse the repository at this point in the history
  • Loading branch information
carddev81 committed Oct 31, 2024
1 parent de2ff1b commit 2af0546
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider-middleware/kolibri_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func UploadImage(thumbnail, root, id string) (string, error) {
return "", fmt.Errorf("server returned non-OK status: %s", response.Status)
}
urlRes := struct {
data struct {
Data struct {
Url string `json:"url"`
}
Message string `json:"message"`
Expand All @@ -176,7 +176,7 @@ func UploadImage(thumbnail, root, id string) (string, error) {
if err != nil {
return "", err
}
return urlRes.data.Url, nil
return urlRes.Data.Url, nil
}

type Role struct {
Expand Down

0 comments on commit 2af0546

Please sign in to comment.