This commit is contained in:
lbenedar
2026-03-17 15:01:59 +03:00
parent dbd1c6eee8
commit bef81be50c
4 changed files with 94 additions and 1 deletions

View File

@@ -39,3 +39,7 @@ func (app *application) methodNotAllowedResponse(w http.ResponseWriter, r *http.
func (app *application) badRequestResponse(w http.ResponseWriter, r *http.Request, err error) {
app.errorResponse(w, r, http.StatusBadRequest, err.Error())
}
func (app *application) failedValidationResponse(w http.ResponseWriter, r *http.Request, errors map[string]string) {
app.errorResponse(w, r, http.StatusUnprocessableEntity, errors)
}