mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Get db key values sort by updated
This commit is contained in:
parent
1ddf8bc447
commit
6af0432145
1 changed files with 4 additions and 0 deletions
|
|
@ -102,6 +102,10 @@ func GetAttributeViewPrimaryKeyValues(avID, keyword string, page, pageSize int)
|
|||
end = len(keyValues.Values)
|
||||
}
|
||||
keyValues.Values = keyValues.Values[start:end]
|
||||
|
||||
sort.Slice(keyValues.Values, func(i, j int) bool {
|
||||
return keyValues.Values[i].Block.Updated > keyValues.Values[j].Block.Updated
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue