From 01a5958307be35aa5dd5e3d49e31fc9756bfd743 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sat, 16 Mar 2024 21:14:19 +0800 Subject: [PATCH] Improve error text in RequireAdmin() --- controllers/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/util.go b/controllers/util.go index 35892d9f..a27acd6e 100644 --- a/controllers/util.go +++ b/controllers/util.go @@ -129,6 +129,7 @@ func (c *ApiController) RequireAdmin() (string, bool) { } if !user.IsAdmin { + c.ResponseError(c.T("general:this operation requires administrator to perform")) return "", false }