即梦视频后台管理页面初始化

This commit is contained in:
GeekMaster
2025-07-18 21:19:59 +08:00
parent 5e4ba6d971
commit 73d003d6c3
10 changed files with 172 additions and 65 deletions

View File

@@ -31,14 +31,14 @@ func NewConfigHandler(app *core.AppServer, db *gorm.DB, licenseService *service.
func (h *ConfigHandler) Get(c *gin.Context) {
key := c.Query("key")
var config model.Config
res := h.DB.Where("marker", key).First(&config)
res := h.DB.Where("name", key).First(&config)
if res.Error != nil {
resp.ERROR(c, res.Error.Error())
return
}
var value map[string]interface{}
err := utils.JsonDecode(config.Config, &value)
var value map[string]any
err := utils.JsonDecode(config.Value, &value)
if err != nil {
resp.ERROR(c, err.Error())
return