mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
✨ 数据仓库支持云端备份 https://github.com/siyuan-note/siyuan/issues/5336
This commit is contained in:
parent
ebdb5b2a36
commit
e41d411c2d
10 changed files with 108 additions and 38 deletions
|
|
@ -66,7 +66,7 @@ func getRepoIndexLogs(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func indexRepo(c *gin.Context) {
|
||||
func createSnapshot(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
|
|
@ -75,8 +75,8 @@ func indexRepo(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
message := arg["message"].(string)
|
||||
if err := model.IndexRepo(message); nil != err {
|
||||
name := arg["name"].(string)
|
||||
if err := model.CreateSnapshot(name); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(140), err)
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue