Added fallback createdAt date to date range.

This commit is contained in:
DebaucheryLibrarian 2020-12-28 01:33:09 +01:00
parent 1ec2b3ac36
commit 029099d4a5
1 changed files with 3 additions and 3 deletions

View File

@ -7,12 +7,12 @@ const dateRanges = {
latest: () => ({
after: '1900-01-01',
before: dayjs.utc().toDate(),
orderBy: 'DATE_DESC',
orderBy: ['DATE_DESC', 'CREATED_AT_DESC'],
}),
upcoming: () => ({
after: dayjs.utc().toDate(),
before: '2100-01-01',
orderBy: 'DATE_ASC',
orderBy: ['DATE_ASC', 'CREATED_AT_ASC'],
}),
new: () => ({
after: '1900-01-01 00:00:00',
@ -22,7 +22,7 @@ const dateRanges = {
all: () => ({
after: '1900-01-01',
before: '2100-01-01',
orderBy: 'DATE_DESC',
orderBy: ['DATE_DESC', 'CREATED_AT_DESC'],
}),
};