Improve error text in RequireAdmin()

This commit is contained in:
Yang Luo
2024-03-16 21:14:19 +08:00
parent be88b00278
commit 01a5958307

View File

@ -129,6 +129,7 @@ func (c *ApiController) RequireAdmin() (string, bool) {
} }
if !user.IsAdmin { if !user.IsAdmin {
c.ResponseError(c.T("general:this operation requires administrator to perform"))
return "", false return "", false
} }