mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
8ba7cd3aa3
commit
b885773a7e
7 changed files with 49 additions and 4 deletions
|
|
@ -116,3 +116,18 @@ func initRepoKey(c *gin.Context) {
|
|||
"key": hex.EncodeToString(model.Conf.Repo.Key),
|
||||
}
|
||||
}
|
||||
|
||||
func resetRepo(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
if err := model.ResetRepo(); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(146), err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"key": hex.EncodeToString(model.Conf.Repo.Key),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue