🔥 移除旧版云端同步和备份功能入口 https://github.com/siyuan-note/siyuan/issues/5405

This commit is contained in:
Liang Ding 2022-07-13 20:23:04 +08:00
parent e538824819
commit 2863e32cff
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
11 changed files with 63 additions and 710 deletions

View file

@ -21,11 +21,38 @@ import (
"net/http"
"github.com/88250/gulu"
"github.com/dustin/go-humanize"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/util"
)
func getCloudSpace(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
sync, backup, size, assetSize, totalSize, err := model.GetCloudSpace()
if nil != err {
ret.Code = 1
ret.Msg = err.Error()
util.PushErrMsg(err.Error(), 3000)
return
}
hTrafficUploadSize := humanize.Bytes(uint64(model.Conf.User.UserTrafficUpload))
hTrafficDownloadSize := humanize.Bytes(uint64(model.Conf.User.UserTrafficDownload))
ret.Data = map[string]interface{}{
"sync": sync,
"backup": backup,
"hAssetSize": assetSize,
"hSize": size,
"hTotalSize": totalSize,
"hTrafficUploadSize": hTrafficUploadSize,
"hTrafficDownloadSize": hTrafficDownloadSize,
}
}
func checkoutRepo(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)