🎨 Support downloading cloud data snapshots to local on demand https://github.com/siyuan-note/siyuan/issues/8057

This commit is contained in:
Liang Ding 2023-04-21 17:04:26 +08:00
parent 83318d6246
commit c2dafe4899
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
10 changed files with 59 additions and 3 deletions

View file

@ -175,6 +175,33 @@ func getRepoSnapshots(c *gin.Context) {
"pageCount": pageCount,
"totalCount": totalCount,
}
model.GetCloudRepoSnapshots("")
}
func getCloudRepoSnapshots(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
marker := arg["marker"].(string)
snapshots, nextMarker, err := model.GetCloudRepoSnapshots(marker)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
ret.Data = map[string]interface{}{
"snapshots": snapshots,
"nextMarker": nextMarker,
}
}
func getCloudRepoTagSnapshots(c *gin.Context) {