mirror of
https://github.com/go-gitea/gitea
synced 2024-06-01 19:06:52 +02:00
Reuse method JSONError
This commit is contained in:
parent
03562c7ff7
commit
24c2c13c41
|
@ -277,5 +277,5 @@ func (ctx *Context) JSONServerError(msg string, err error) {
|
|||
errorMessage = fmt.Sprintf("%s: %v", errorMessage, err)
|
||||
}
|
||||
}
|
||||
ctx.JSON(http.StatusBadRequest, map[string]any{"errorMessage": errorMessage, "renderFormat": "text"})
|
||||
ctx.JSONError(errorMessage)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user