This commit is contained in:
2024-04-11 14:24:55 +08:00
parent 51ac40758e
commit 36ed79167f
22 changed files with 210 additions and 305 deletions
+5 -1
View File
@@ -80,7 +80,11 @@ func validateTransInit(validate *validator.Validate) ut.Translator {
}
func GetCurrentUserInfo(c *gin.Context) (userInfo models.User, exist bool) {
if value, exist := c.Get("userInfo"); exist {
value, exist := c.Get("userInfo")
fmt.Println("exist", exist)
fmt.Println("value", value)
if exist {
if v, ok := value.(models.User); ok {
return v, exist
}