mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🧑💻 siyuan-note#12718 (#12723)
This commit is contained in:
parent
f965d6b91b
commit
7afea33d36
4 changed files with 157 additions and 15 deletions
|
|
@ -278,6 +278,30 @@ func getDocInfo(c *gin.Context) {
|
|||
ret.Data = info
|
||||
}
|
||||
|
||||
func getDocsInfo(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
idsArg := arg["ids"].([]interface{})
|
||||
var ids []string
|
||||
for _, id := range idsArg {
|
||||
ids = append(ids, id.(string))
|
||||
}
|
||||
queryRefCount := arg["refCount"].(bool)
|
||||
queryAv := arg["av"].(bool)
|
||||
info := model.GetDocsInfo(ids, queryRefCount, queryAv)
|
||||
if nil == info {
|
||||
ret.Code = -1
|
||||
ret.Msg = fmt.Sprintf(model.Conf.Language(15), ids)
|
||||
return
|
||||
}
|
||||
ret.Data = info
|
||||
}
|
||||
|
||||
func getRecentUpdatedBlocks(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue