api: fix validation and http response

This commit is contained in:
yusing
2025-01-04 09:01:52 +08:00
parent 112859caa5
commit c30d3f585f
6 changed files with 33 additions and 16 deletions

View File

@@ -48,7 +48,7 @@ func SetFileContent(w http.ResponseWriter, r *http.Request) {
// no validation for include files
if valErr != nil {
U.RespondJSON(w, r, valErr, http.StatusBadRequest)
U.RespondError(w, valErr, http.StatusBadRequest)
return
}