mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-02 10:03:16 +00:00
feat(i18n): replace hardcoded messages with translated strings (#289)
This commit is contained in:
@@ -13,13 +13,13 @@ func BackendUserAuth() gin.HandlerFunc {
|
||||
//测试先关闭
|
||||
token := c.GetHeader("api-token")
|
||||
if token == "" {
|
||||
response.Fail(c, 403, "请先登录")
|
||||
response.Fail(c, 403, response.TranslateMsg(c, "NeedLogin"))
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
user, ut := service.AllService.UserService.InfoByAccessToken(token)
|
||||
if user.Id == 0 {
|
||||
response.Fail(c, 403, "请先登录")
|
||||
response.Fail(c, 403, response.TranslateMsg(c, "NeedLogin"))
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user