Przeglądaj źródła

:art: 支持间隔复习 https://github.com/siyuan-note/siyuan/issues/6710

Liang Ding 2 lat temu
rodzic
commit
efe37bd4f9
3 zmienionych plików z 9 dodań i 4 usunięć
  1. 6 3
      kernel/api/riff.go
  2. 1 1
      kernel/go.mod
  3. 2 0
      kernel/go.sum

+ 6 - 3
kernel/api/riff.go

@@ -18,6 +18,7 @@ package api
 
 import (
 	"net/http"
+	"time"
 
 	"github.com/88250/gulu"
 	"github.com/gin-gonic/gin"
@@ -201,9 +202,11 @@ func getRiffDecks(c *gin.Context) {
 	var data []interface{}
 	for _, deck := range decks {
 		data = append(data, map[string]interface{}{
-			"id":   deck.ID,
-			"name": deck.Name,
-			"size": len(deck.BlockCard),
+			"id":      deck.ID,
+			"name":    deck.Name,
+			"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) {

+ 1 - 1
kernel/go.mod

@@ -45,7 +45,7 @@ require (
 	github.com/siyuan-note/filelock v0.0.0-20221117095924-e1947438a35e
 	github.com/siyuan-note/httpclient v0.0.0-20221213030227-fa8d21fd9cf8
 	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/studio-b12/gowebdav v0.0.0-20221109171924-60ec5ad56012
 	github.com/vmihailenco/msgpack/v5 v5.3.5

+ 2 - 0
kernel/go.sum

@@ -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/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-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/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
 github.com/smartystreets/goconvey v1.6.7 h1:I6tZjLXD2Q1kjvNbIzB1wvQBsXmKXiVrhpRE8ZjP5jY=