Fixed pagination if no params are set
ci/woodpecker/tag/ociImageTag Pipeline was successful
Details
ci/woodpecker/tag/ociImageTag Pipeline was successful
Details
This commit is contained in:
parent
e046598329
commit
4a7cd41a90
|
@ -7,7 +7,7 @@ export function makePaginationQuery<T>(
|
||||||
sinceDate?: number,
|
sinceDate?: number,
|
||||||
untilDate?: number,
|
untilDate?: number,
|
||||||
) {
|
) {
|
||||||
if (!sinceDate && !untilDate) {
|
if (!sinceDate && !untilDate && (sinceId || untilId)) {
|
||||||
if (sinceId && untilId) {
|
if (sinceId && untilId) {
|
||||||
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: sinceId });
|
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: sinceId });
|
||||||
q.andWhere(`${q.alias}.id < :untilId`, { untilId: untilId });
|
q.andWhere(`${q.alias}.id < :untilId`, { untilId: untilId });
|
||||||
|
|
Loading…
Reference in New Issue