backend: fixed wrong error codes
This commit is contained in:
@@ -80,7 +80,7 @@ func AuthMiddleware() gin.HandlerFunc {
|
||||
logger.Error.Printf("No Auth token: %v\n", err)
|
||||
c.JSON(http.StatusUnauthorized,
|
||||
gin.H{"errors": []gin.H{{
|
||||
"field": "general",
|
||||
"field": "server.general",
|
||||
"key": "server.error.no_auth_token",
|
||||
}}})
|
||||
c.Abort()
|
||||
@@ -97,7 +97,7 @@ func AuthMiddleware() gin.HandlerFunc {
|
||||
logger.Error.Printf("Token(%v) is invalid: %v\n", tokenString, err)
|
||||
c.JSON(http.StatusUnauthorized,
|
||||
gin.H{"errors": []gin.H{{
|
||||
"field": "general",
|
||||
"field": "server.general",
|
||||
"key": "server.error.no_auth_token",
|
||||
}}})
|
||||
c.Abort()
|
||||
|
||||
Reference in New Issue
Block a user