Actually check the error state for saving an image
This commit is contained in:
parent
43edca7093
commit
1cfe51f894
2 changed files with 4 additions and 2 deletions
|
|
@ -1 +0,0 @@
|
|||
package api
|
||||
|
|
@ -75,7 +75,10 @@ func (res *publicreportR) ImageCreate(ctx context.Context, r *http.Request, n nu
|
|||
return nil, nhttp.NewError("Failed to extract image uploads: %w", err)
|
||||
}
|
||||
|
||||
platform.PublicReportImageCreate(ctx, public_id, uploads)
|
||||
err = platform.PublicReportImageCreate(ctx, public_id, uploads)
|
||||
if err != nil {
|
||||
return nil, nhttp.NewError("Failed to created image: %w", err)
|
||||
}
|
||||
return &image{Status: "ok"}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue