mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Support for modifying Settings - About - API token https://github.com/siyuan-note/siyuan/issues/9448
This commit is contained in:
parent
df3cae411f
commit
c597bd2f3d
2 changed files with 15 additions and 0 deletions
|
|
@ -239,6 +239,20 @@ func setUILayout(c *gin.Context) {
|
|||
model.Conf.Save()
|
||||
}
|
||||
|
||||
func setAPIToken(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
token := arg["token"].(string)
|
||||
model.Conf.Api.Token = token
|
||||
model.Conf.Save()
|
||||
}
|
||||
|
||||
func setAccessAuthCode(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue