mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Support setting automatic sync interval https://github.com/siyuan-note/siyuan/issues/13448
This commit is contained in:
parent
152fa6e6e0
commit
45a6f7e29d
18 changed files with 100 additions and 12 deletions
|
|
@ -541,6 +541,17 @@ func setSyncEnable(c *gin.Context) {
|
|||
model.SetSyncEnable(enabled)
|
||||
}
|
||||
|
||||
func setSyncInterval(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
interval := int(arg["interval"].(float64))
|
||||
model.SetSyncInterval(interval)
|
||||
}
|
||||
|
||||
func setSyncPerception(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue