mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
c269c10442
commit
3db97a8f59
3 changed files with 73 additions and 26 deletions
|
|
@ -366,31 +366,6 @@ func setE2EEPasswd(c *gin.Context) {
|
|||
model.SyncData(false, false, true)
|
||||
}
|
||||
|
||||
func initRepoKey(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
util.PushMsg(model.Conf.Language(136), 1000*7)
|
||||
if err := os.RemoveAll(model.Conf.Repo.GetSaveDir()); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
if err := os.MkdirAll(model.Conf.Repo.GetSaveDir(), 0755); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
if err := model.InitRepoKey(); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = model.Conf.Language(137)
|
||||
return
|
||||
}
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
util.PushMsg(model.Conf.Language(138), 3000)
|
||||
}
|
||||
|
||||
func addUIProcess(c *gin.Context) {
|
||||
pid := c.Query("pid")
|
||||
util.UIProcessIDs.Store(pid, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue