mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🐛 File history cannot load the correct view of database blocks https://github.com/siyuan-note/siyuan/issues/15841
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
41f72e65d3
commit
ba0c6883e6
2 changed files with 37 additions and 3 deletions
|
|
@ -675,7 +675,41 @@ func renderHistoryAttributeView(c *gin.Context) {
|
|||
|
||||
id := arg["id"].(string)
|
||||
created := arg["created"].(string)
|
||||
view, attrView, err := model.RenderHistoryAttributeView(id, created)
|
||||
blockIDArg := arg["blockID"]
|
||||
var blockID string
|
||||
if nil != blockIDArg {
|
||||
blockID = blockIDArg.(string)
|
||||
}
|
||||
viewIDArg := arg["viewID"]
|
||||
var viewID string
|
||||
if nil != viewIDArg {
|
||||
viewID = viewIDArg.(string)
|
||||
}
|
||||
page := 1
|
||||
pageArg := arg["page"]
|
||||
if nil != pageArg {
|
||||
page = int(pageArg.(float64))
|
||||
}
|
||||
|
||||
pageSize := -1
|
||||
pageSizeArg := arg["pageSize"]
|
||||
if nil != pageSizeArg {
|
||||
pageSize = int(pageSizeArg.(float64))
|
||||
}
|
||||
|
||||
query := ""
|
||||
queryArg := arg["query"]
|
||||
if nil != queryArg {
|
||||
query = queryArg.(string)
|
||||
}
|
||||
|
||||
groupPaging := map[string]interface{}{}
|
||||
groupPagingArg := arg["groupPaging"]
|
||||
if nil != groupPagingArg {
|
||||
groupPaging = groupPagingArg.(map[string]interface{})
|
||||
}
|
||||
|
||||
view, attrView, err := model.RenderHistoryAttributeView(blockID, id, viewID, query, page, pageSize, groupPaging, created)
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue