refactor🎨 : 修改文件操作函数

This commit is contained in:
zhangwenjian committed 2020-12-21 22:02:40 +08:00
1 parent 37a2c585e1
commit 746123c888
12 files changed
+128 -169

No files matched your search

-8
View File
@@ -17,14 +17,6 @@ func ExtractClaims(c *gin.Context) jwt.MapClaims {
return claims.(jwt.MapClaims)
}
func GetUserIdUint(c *gin.Context) uint {
data := ExtractClaims(c)
if data["identity"] != nil {
return uint((data["identity"]).(float64))
}
fmt.Println(GetCurrentTimeStr() + " [WARING] " + c.Request.Method + " " + c.Request.URL.Path + " GetUserId 缺少identity")
return 0
}
func GetUserId(c *gin.Context) int {
data := ExtractClaims(c)