mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-07 20:20:58 -06:00
[server] Ensure version ordering
This commit is contained in:
@@ -25,7 +25,7 @@ const versionsQuery = "COALESCE(JSONB_AGG(JSONB_BUILD_OBJECT(" +
|
||||
"'mime_type',v.mime_type," +
|
||||
"'size',v.size," +
|
||||
"'sha256',v.sha256" +
|
||||
")), '[]'::JSONB)"
|
||||
") ORDER BY v.created DESC), '[]'::JSONB)"
|
||||
|
||||
const fullResourceQuery = `SELECT r.*,
|
||||
(SELECT ` + versionsQuery + ` FROM resource_versions v WHERE v.resource_id = r.id) AS versions,
|
||||
|
||||
Reference in New Issue
Block a user