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