fix: fixed bug for enable user vip in admin console not work

This commit is contained in:
RockYang 2023-11-22 11:30:58 +08:00
parent cfe6f27d48
commit 9b68d8101e

View File

@ -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),