Revert "Reuse method JSONError"

This reverts commit 24c2c13c41.
This commit is contained in:
Lunny Xiao 2024-05-02 14:25:42 +08:00
parent 2bb832ece1
commit e9f58eb5f9
1 changed files with 1 additions and 1 deletions

View File

@ -277,5 +277,5 @@ func (ctx *Context) JSONServerError(msg string, err error) {
errorMessage = fmt.Sprintf("%s: %v", errorMessage, err)
}
}
ctx.JSONError(errorMessage)
ctx.JSON(http.StatusBadRequest, map[string]any{"errorMessage": errorMessage, "renderFormat": "text"})
}