mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fix: fixed bug for enable user vip in admin console not work
This commit is contained in:
parent
cfe6f27d48
commit
9b68d8101e
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user