🎨 Get db key values sort by updated

This commit is contained in:
Daniel 2024-05-12 11:05:57 +08:00
parent 1ddf8bc447
commit 6af0432145
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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
}