chore: fix memo resources position

This commit is contained in:
Steven
2024-01-06 09:23:20 +08:00
parent 501f8898f6
commit 8b9455d784
4 changed files with 14 additions and 9 deletions

View File

@ -49,8 +49,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st
%s
FROM resource
WHERE %s
GROUP BY id
ORDER BY created_ts DESC
ORDER BY updated_ts DESC, created_ts DESC
`, strings.Join(fields, ", "), strings.Join(where, " AND "))
if find.Limit != nil {
query = fmt.Sprintf("%s LIMIT %d", query, *find.Limit)