mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
54be717b9c
commit
efe37bd4f9
3 changed files with 9 additions and 4 deletions
|
|
@ -18,6 +18,7 @@ package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
@ -201,9 +202,11 @@ func getRiffDecks(c *gin.Context) {
|
||||||
var data []interface{}
|
var data []interface{}
|
||||||
for _, deck := range decks {
|
for _, deck := range decks {
|
||||||
data = append(data, map[string]interface{}{
|
data = append(data, map[string]interface{}{
|
||||||
"id": deck.ID,
|
"id": deck.ID,
|
||||||
"name": deck.Name,
|
"name": deck.Name,
|
||||||
"size": len(deck.BlockCard),
|
"size": len(deck.BlockCard),
|
||||||
|
"created": time.UnixMilli(deck.Created).Format("2006-01-02 15:04:05"),
|
||||||
|
"updated": time.UnixMilli(deck.Updated).Format("2006-01-02 15:04:05"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if 1 > len(data) {
|
if 1 > len(data) {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ require (
|
||||||
github.com/siyuan-note/filelock v0.0.0-20221117095924-e1947438a35e
|
github.com/siyuan-note/filelock v0.0.0-20221117095924-e1947438a35e
|
||||||
github.com/siyuan-note/httpclient v0.0.0-20221213030227-fa8d21fd9cf8
|
github.com/siyuan-note/httpclient v0.0.0-20221213030227-fa8d21fd9cf8
|
||||||
github.com/siyuan-note/logging v0.0.0-20221031125421-9b7234d79d8a
|
github.com/siyuan-note/logging v0.0.0-20221031125421-9b7234d79d8a
|
||||||
github.com/siyuan-note/riff v0.0.0-20221223144739-8a426702f7b8
|
github.com/siyuan-note/riff v0.0.0-20221223145438-041dea8f7945
|
||||||
github.com/steambap/captcha v1.4.1
|
github.com/steambap/captcha v1.4.1
|
||||||
github.com/studio-b12/gowebdav v0.0.0-20221109171924-60ec5ad56012
|
github.com/studio-b12/gowebdav v0.0.0-20221109171924-60ec5ad56012
|
||||||
github.com/vmihailenco/msgpack/v5 v5.3.5
|
github.com/vmihailenco/msgpack/v5 v5.3.5
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,8 @@ github.com/siyuan-note/logging v0.0.0-20221031125421-9b7234d79d8a h1:b9VJCE8IccY
|
||||||
github.com/siyuan-note/logging v0.0.0-20221031125421-9b7234d79d8a/go.mod h1:t1zRGxK13L/9ZFoGyTD39IbFCbee3CsypDj4b5dt4qM=
|
github.com/siyuan-note/logging v0.0.0-20221031125421-9b7234d79d8a/go.mod h1:t1zRGxK13L/9ZFoGyTD39IbFCbee3CsypDj4b5dt4qM=
|
||||||
github.com/siyuan-note/riff v0.0.0-20221223144739-8a426702f7b8 h1:eiwx9YiXhZ+uj9UWWX9RXSWWvCF5cMFrJACaz7YVy5U=
|
github.com/siyuan-note/riff v0.0.0-20221223144739-8a426702f7b8 h1:eiwx9YiXhZ+uj9UWWX9RXSWWvCF5cMFrJACaz7YVy5U=
|
||||||
github.com/siyuan-note/riff v0.0.0-20221223144739-8a426702f7b8/go.mod h1:WnNt0JPjfXp2fjAgbF9rS5W7JC2W0YVcaVmLXIeYF8A=
|
github.com/siyuan-note/riff v0.0.0-20221223144739-8a426702f7b8/go.mod h1:WnNt0JPjfXp2fjAgbF9rS5W7JC2W0YVcaVmLXIeYF8A=
|
||||||
|
github.com/siyuan-note/riff v0.0.0-20221223145438-041dea8f7945 h1:ED7QFLeOu5/PpXK1v0ax82MJrhpgPrxkq6UEhIEOnFA=
|
||||||
|
github.com/siyuan-note/riff v0.0.0-20221223145438-041dea8f7945/go.mod h1:WnNt0JPjfXp2fjAgbF9rS5W7JC2W0YVcaVmLXIeYF8A=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
github.com/smartystreets/goconvey v1.6.7 h1:I6tZjLXD2Q1kjvNbIzB1wvQBsXmKXiVrhpRE8ZjP5jY=
|
github.com/smartystreets/goconvey v1.6.7 h1:I6tZjLXD2Q1kjvNbIzB1wvQBsXmKXiVrhpRE8ZjP5jY=
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue