🎨 Support setting automatic sync interval https://github.com/siyuan-note/siyuan/issues/13448

This commit is contained in:
Daniel 2024-12-14 12:02:14 +08:00
parent 152fa6e6e0
commit 45a6f7e29d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
18 changed files with 100 additions and 12 deletions

View file

@ -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)