feat(settings): enable background settings

This commit is contained in:
hexxa 2021-10-09 21:14:15 +08:00 committed by Hexxa
parent b151c1b56e
commit f151f47581
13 changed files with 229 additions and 17 deletions

View file

@ -30,7 +30,7 @@ func (h *SettingsSvc) Health(c *gin.Context) {
}
type ClientCfgMsg struct {
ClientCfg *sitestore.ClientConfig
ClientCfg *sitestore.ClientConfig `json:"clientCfg"`
}
func (h *SettingsSvc) GetClientCfg(c *gin.Context) {
@ -51,6 +51,8 @@ func (h *SettingsSvc) SetClientCfg(c *gin.Context) {
c.JSON(q.ErrResp(c, 400, err))
return
}
h.deps.Log().Info(req.ClientCfg)
if err = validateClientCfg(req.ClientCfg); err != nil {
c.JSON(q.ErrResp(c, 400, err))
return