feat: implement drag and drop for resource order in editor (#3337)

* Implement drag and drop for resource order in editor

* chore: update

* chore: update

* chore: update
This commit is contained in:
boojack
2024-05-10 20:34:35 +08:00
committed by GitHub
parent 5f207c8f0c
commit 3fbc4d8539
7 changed files with 126 additions and 24 deletions

View File

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