api0(fix) incorrect status code

This commit is contained in:
Theo Technicguy 2023-08-24 16:39:29 +02:00
parent e399fe0da7
commit ce1ca84d94
Signed by: theo.technicguy
GPG Key ID: 3BC661201BCA53D9
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ func getAllProducts(w http.ResponseWriter, r *http.Request) {
products, err := lgc.GetAllProducts()
if err != nil {
respondWithError(w, http.StatusBadRequest, err)
respondWithError(w, http.StatusInternalServerError, err)
return
}

View File

@ -22,7 +22,7 @@ func getAllTags(w http.ResponseWriter, r *http.Request) {
tags, err := lgc.GetAllProductTags()
if err != nil {
respondWithError(w, http.StatusBadRequest, err)
respondWithError(w, http.StatusInternalServerError, err)
return
}