fixed bug, filelist page support pagination, do not load captcha component for user login first time

This commit is contained in:
RockYang
2024-09-13 17:03:05 +08:00
parent 5c77e67b0f
commit 6c7fa17e50
11 changed files with 33 additions and 19 deletions

View File

@@ -25,7 +25,7 @@ func (h *ChatAppTypeHandler) Save(c *gin.Context) {
var data struct {
Id uint `json:"id"`
Name string `json:"name"`
Enable bool `json:"enable"`
Enabled bool `json:"enabled"`
Icon string `json:"icon"`
SortNum int `json:"sort_num"`
}
@@ -43,7 +43,7 @@ func (h *ChatAppTypeHandler) Save(c *gin.Context) {
err = h.DB.Create(&model.AppType{
Name: data.Name,
Icon: data.Icon,
Enabled: data.Enable,
Enabled: data.Enabled,
SortNum: data.SortNum,
}).Error
if err != nil {
@@ -54,7 +54,7 @@ func (h *ChatAppTypeHandler) Save(c *gin.Context) {
err := h.DB.Model(&model.AppType{}).Where("id", data.Id).Updates(map[string]interface{}{
"name": data.Name,
"icon": data.Icon,
"enabled": data.Enable,
"enabled": data.Enabled,
}).Error
if err != nil {
resp.ERROR(c, err.Error())