mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Fixed a lot of bad queries
This commit is contained in:
parent
a3cf4f17f8
commit
233217beb9
15 changed files with 48 additions and 30 deletions
|
@ -41,7 +41,6 @@ func SendStatus(httpStatus int, w http.ResponseWriter, description string, l log
|
|||
err := json.NewEncoder(w).Encode(structures.GenericResponse{Status: description})
|
||||
if err != nil {
|
||||
l.WithError(err).Error("Error encoding json")
|
||||
//todo: empty response?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +49,6 @@ func SendNotFound(w http.ResponseWriter, description string, l logrus.FieldLogge
|
|||
err := json.NewEncoder(w).Encode(structures.GenericResponse{Status: description})
|
||||
if err != nil {
|
||||
l.WithError(err).Error("Error encoding json")
|
||||
//todo: empty response?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +57,6 @@ func SendBadRequest(w http.ResponseWriter, description string, l logrus.FieldLog
|
|||
err := json.NewEncoder(w).Encode(structures.GenericResponse{Status: description})
|
||||
if err != nil {
|
||||
l.WithError(err).Error("Error encoding json")
|
||||
//todo: empty response?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +66,6 @@ func SendBadRequestError(err error, description string, w http.ResponseWriter, l
|
|||
err = json.NewEncoder(w).Encode(structures.GenericResponse{Status: description})
|
||||
if err != nil {
|
||||
l.WithError(err).Error("Error encoding json")
|
||||
//todo: empty response?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +75,6 @@ func SendInternalError(err error, description string, w http.ResponseWriter, l l
|
|||
err = json.NewEncoder(w).Encode(structures.GenericResponse{Status: description})
|
||||
if err != nil {
|
||||
l.WithError(err).Error("Error encoding json")
|
||||
//todo: empty response?
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue