mirror of
				https://github.com/yangjian102621/geekai.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix: fixed bug for enable user vip in admin console not work
This commit is contained in:
		@@ -70,6 +70,7 @@ func (h *UserHandler) Save(c *gin.Context) {
 | 
				
			|||||||
		ChatModels  []string `json:"chat_models"`
 | 
							ChatModels  []string `json:"chat_models"`
 | 
				
			||||||
		ExpiredTime string   `json:"expired_time"`
 | 
							ExpiredTime string   `json:"expired_time"`
 | 
				
			||||||
		Status      bool     `json:"status"`
 | 
							Status      bool     `json:"status"`
 | 
				
			||||||
 | 
							Vip         bool     `json:"vip"`
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := c.ShouldBindJSON(&data); err != nil {
 | 
						if err := c.ShouldBindJSON(&data); err != nil {
 | 
				
			||||||
		resp.ERROR(c, types.InvalidArgs)
 | 
							resp.ERROR(c, types.InvalidArgs)
 | 
				
			||||||
@@ -86,6 +87,7 @@ func (h *UserHandler) Save(c *gin.Context) {
 | 
				
			|||||||
			"calls":            data.Calls,
 | 
								"calls":            data.Calls,
 | 
				
			||||||
			"img_calls":        data.ImgCalls,
 | 
								"img_calls":        data.ImgCalls,
 | 
				
			||||||
			"status":           data.Status,
 | 
								"status":           data.Status,
 | 
				
			||||||
 | 
								"vip":              data.Vip,
 | 
				
			||||||
			"chat_roles_json":  utils.JsonEncode(data.ChatRoles),
 | 
								"chat_roles_json":  utils.JsonEncode(data.ChatRoles),
 | 
				
			||||||
			"chat_models_json": utils.JsonEncode(data.ChatModels),
 | 
								"chat_models_json": utils.JsonEncode(data.ChatModels),
 | 
				
			||||||
			"expired_time":     utils.Str2stamp(data.ExpiredTime),
 | 
								"expired_time":     utils.Str2stamp(data.ExpiredTime),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user