mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 公测云端同步数据仓库 https://github.com/siyuan-note/siyuan/issues/5337
This commit is contained in:
parent
5b1b38aabe
commit
eb79fbd37d
10 changed files with 59 additions and 0 deletions
|
|
@ -121,6 +121,25 @@ func createCloudSyncDir(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func setSyncUseDataRepo(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
enabled := arg["enabled"].(bool)
|
||||
err := model.SetSyncUseDataRepo(enabled)
|
||||
if nil != err {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func setSyncEnable(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue