This commit is contained in:
Liang Ding 2022-11-02 18:21:47 +08:00
parent ba8d07b3d0
commit 272db50b88
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 38 additions and 49 deletions

View file

@ -21,7 +21,6 @@ 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"
@ -31,7 +30,7 @@ func getCloudSpace(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
sync, backup, size, assetSize, totalSize, err := model.GetCloudSpace()
sync, backup, size, assetSize, totalSize, hTrafficUploadSize, hTrafficDownloadSize, err := model.GetCloudSpace()
if nil != err {
ret.Code = 1
ret.Msg = err.Error()
@ -39,9 +38,6 @@ func getCloudSpace(c *gin.Context) {
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,