update
This commit is contained in:
1 parent
51ac40758e
commit
36ed79167f
22 files changed
+210
-305
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user