feat(i18n): replace hardcoded messages with translated strings (#289)

This commit is contained in:
Plynksiy Nikita
2025-06-17 09:05:10 +08:00
committed by GitHub
parent 2948eaaa5c
commit 1257246552
12 changed files with 49 additions and 14 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ func AdminPrivilege() gin.HandlerFunc {
u := service.AllService.UserService.CurUser(c)
if !service.AllService.UserService.IsAdmin(u) {
response.Fail(c, 403, "无权限")
response.Fail(c, 403, response.TranslateMsg(c, "NoAccess"))
c.Abort()
return
}