mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🔥 移除旧版云端同步和备份功能入口 https://github.com/siyuan-note/siyuan/issues/5405
This commit is contained in:
parent
e538824819
commit
2863e32cff
11 changed files with 63 additions and 710 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue