Pārlūkot izejas kodu

:art: Data sync supports the multi-kernel online perception https://github.com/siyuan-note/siyuan/issues/8518

Daniel 2 gadi atpakaļ
vecāks
revīzija
b8a400c272
2 mainītis faili ar 2 papildinājumiem un 8 dzēšanām
  1. 1 7
      kernel/api/sync.go
  2. 1 1
      kernel/model/sync.go

+ 1 - 7
kernel/api/sync.go

@@ -209,13 +209,7 @@ func setSyncMode(c *gin.Context) {
 	}
 
 	mode := int(arg["mode"].(float64))
-	err := model.SetSyncMode(mode)
-	if nil != err {
-		ret.Code = -1
-		ret.Msg = err.Error()
-		ret.Data = map[string]interface{}{"closeTimeout": 5000}
-		return
-	}
+	model.SetSyncMode(mode)
 }
 
 func setSyncProvider(c *gin.Context) {

+ 1 - 1
kernel/model/sync.go

@@ -351,7 +351,7 @@ func SetSyncPerception(b bool) {
 	return
 }
 
-func SetSyncMode(mode int) (err error) {
+func SetSyncMode(mode int) {
 	Conf.Sync.Mode = mode
 	Conf.Save()
 	return