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

This commit is contained in:
Plynksiy Nikita
2025-06-17 04:05:10 +03:00
committed by GitHub
parent 4b16ad29bb
commit f68ec8f3a1
12 changed files with 49 additions and 14 deletions

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
}