1
0
Fork 0

Revert "Return 404 for empty database results."

This reverts commit f16e4579cb.
main
Icedream 2024-01-22 00:49:27 +01:00
parent 126933fb5e
commit ad99a43f92
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
1 changed files with 0 additions and 8 deletions

View File

@ -285,10 +285,6 @@ func main() {
return return
} }
file, err := m.GetFile(uint(fileID)) file, err := m.GetFile(uint(fileID))
if errors.Is(err, gorm.ErrRecordNotFound) {
c.JSON(http.StatusNotFound, err.Error())
return
}
if err != nil { if err != nil {
c.JSON(http.StatusInternalServerError, err.Error()) c.JSON(http.StatusInternalServerError, err.Error())
return return
@ -314,10 +310,6 @@ func main() {
return return
} }
track, err := m.GetTrackByArtistAndTitle(form.Artist, form.Title, false) track, err := m.GetTrackByArtistAndTitle(form.Artist, form.Title, false)
if errors.Is(err, gorm.ErrRecordNotFound) {
c.JSON(http.StatusNotFound, err.Error())
return
}
if err != nil { if err != nil {
c.JSON(http.StatusInternalServerError, err.Error()) c.JSON(http.StatusInternalServerError, err.Error())
return return