(c *gin.Context)
| 17 | ) |
| 18 | |
| 19 | func ResetToken(c *gin.Context) { |
| 20 | token := random.Token() |
| 21 | item := model.SettingItem{Key: "token", Value: token, Type: conf.TypeString, Group: model.SINGLE, Flag: model.PRIVATE} |
| 22 | if err := op.SaveSettingItem(&item); err != nil { |
| 23 | common.ErrorResp(c, err, 500) |
| 24 | return |
| 25 | } |
| 26 | sign.Instance() |
| 27 | common.SuccessResp(c, token) |
| 28 | } |
| 29 | |
| 30 | func GetSetting(c *gin.Context) { |
| 31 | key := c.Query("key") |
nothing calls this directly
no test coverage detected