Actually check the error state for saving an image

This commit is contained in:
Eli Ribble 2026-04-30 14:27:45 +00:00
parent 43edca7093
commit 1cfe51f894
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -1 +0,0 @@
package api

View file

@ -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
}