🎨 Support manual purge of unreferenced data snapshots in the S3/WebDAV cloud storage https://github.com/siyuan-note/siyuan/issues/10081

This commit is contained in:
Daniel 2024-01-24 13:12:25 +08:00
parent bb49855133
commit ce2c774baf
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
10 changed files with 96 additions and 12 deletions

View file

@ -419,3 +419,15 @@ func purgeRepo(c *gin.Context) {
return
}
}
func purgeCloudRepo(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
if err := model.PurgeCloud(); nil != err {
ret.Code = -1
ret.Msg = fmt.Sprintf(model.Conf.Language(201), err.Error())
ret.Data = map[string]interface{}{"closeTimeout": 5000}
return
}
}