feat: update changes, race condition check on version, put -> patch

This commit is contained in:
2026-03-17 16:26:33 +01:00
parent bcf16bc4c6
commit 973a9e341d
10 changed files with 67 additions and 25 deletions
+5
View File
@@ -63,3 +63,8 @@ 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) editConflictResponse(w http.ResponseWriter, r *http.Request) {
message := "unable to update the record due to an edit conflict, please try again"
app.errorResponse(w, r, http.StatusConflict, message)
}