Send full media object in upload API response. Closes #770.
This commit is contained in:
parent
c84837f8cb
commit
77bc8a7745
1 changed files with 3 additions and 3 deletions
|
@ -96,12 +96,12 @@ func handleUploadMedia(c echo.Context) error {
|
|||
}
|
||||
|
||||
// Write to the DB.
|
||||
// TODO: cleanup
|
||||
if _, err := app.core.InsertMedia(fName, thumbfName, app.constants.MediaProvider, app.media); err != nil {
|
||||
m, err := app.core.InsertMedia(fName, thumbfName, app.constants.MediaProvider, app.media)
|
||||
if err != nil {
|
||||
cleanUp = true
|
||||
return err
|
||||
}
|
||||
return c.JSON(http.StatusOK, okResp{true})
|
||||
return c.JSON(http.StatusOK, okResp{m})
|
||||
}
|
||||
|
||||
// handleGetMedia handles retrieval of uploaded media.
|
||||
|
|
Loading…
Reference in a new issue