mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-07 00:36:08 +08:00
将 license 存储到数据库
This commit is contained in:
@@ -131,8 +131,17 @@ func (h *ConfigHandler) Active(c *gin.Context) {
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
}
|
||||
h.App.SysConfig.License = data.License
|
||||
|
||||
// 将 license 写入数据库
|
||||
err = h.DB.Model(&model.Config{}).Where("marker", "system").UpdateColumn("config_json", utils.JsonEncode(h.App.SysConfig)).Error
|
||||
if err != nil {
|
||||
resp.ERROR(c, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp.SUCCESS(c)
|
||||
|
||||
resp.SUCCESS(c, info.HostID)
|
||||
}
|
||||
|
||||
// GetLicense 获取 License 信息
|
||||
|
||||
Reference in New Issue
Block a user