mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 开源云端同步服务实现 https://github.com/siyuan-note/siyuan/issues/6445
This commit is contained in:
parent
ba8d07b3d0
commit
272db50b88
5 changed files with 38 additions and 49 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue