Change handling of sequence parameter.

Allow `null` to be used in addition to `0` in
db.sequence.get() to return all sequences.
This commit is contained in:
D. Berge
2025-08-01 17:05:38 +02:00
parent 471f4e8e64
commit 48d5986415

View File

@@ -31,7 +31,7 @@ async function get (projectId, sequence, opts = {}) {
const offset = Math.abs(opts.offset) || Math.abs((opts.page-1)*opts.itemsPerPage) || 0;
const limit = Math.abs(opts.limit) || Math.abs(Number(opts.itemsPerPage)) || null;
const restriction = sequence != 0
const restriction = sequence
? "sequence = $3"
: "TRUE OR $3";