Skip to content

Commit

Permalink
merging responses
Browse files Browse the repository at this point in the history
  • Loading branch information
karnthis committed Nov 1, 2023
1 parent fdeff2e commit abf0178
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions japicore/pathRouteHandling.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,7 @@ func (j JApiCore) UploadByPathHandler() bunrouter.HandlerFunc {
return jutils.ProcessCustomHttpError("processUpload", warning, 500, w)
}

successfulUpload := UploadResponse{
FID: fid,
}
err = json.NewEncoder(w).Encode(successfulUpload)
if err != nil {
jutils.ProcessHttpError("JSONSuccessEncode", err, 500, w)
return err
}

message := createJsonResponse("Upload complete")
message := createJsonResponse(fid)
jutils.SimpleWriteJSON(w, message)
return nil
}
Expand Down

0 comments on commit abf0178

Please sign in to comment.