update
This commit is contained in:
@@ -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