update: User transmission interface encryption

This commit is contained in:
EUForest
2025-10-12 19:10:52 +08:00
parent 3efa68d3ff
commit 8c776cdbac
13 changed files with 87 additions and 29 deletions
+4 -1
View File
@@ -41,7 +41,10 @@ func AuthMiddleware(svc *svc.ServiceContext) func(c *gin.Context) {
return
}
loginType := claims["LoginType"].(string)
loginType := ""
if claims["LoginType"] != nil {
loginType = claims["LoginType"].(string)
}
// get user id from token
userId := int64(claims["UserId"].(float64))
// get session id from token