Sort queries by startTime and disable pagination of results
This commit is contained in:
@@ -7,6 +7,8 @@ export default function findEventsOnDay(payload: Payload, day: string): Promise<
|
|||||||
|
|
||||||
return payload.find({
|
return payload.find({
|
||||||
collection: 'events',
|
collection: 'events',
|
||||||
|
sort: 'startTime',
|
||||||
|
pagination: false,
|
||||||
where: {
|
where: {
|
||||||
and: [
|
and: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ payload.init({
|
|||||||
|
|
||||||
app.get('/', async (req, res) => {
|
app.get('/', async (req, res) => {
|
||||||
const docs = await payload.find({
|
const docs = await payload.find({
|
||||||
collection: 'events'
|
collection: 'events',
|
||||||
|
sort: 'startTime',
|
||||||
|
pagination: false
|
||||||
});
|
});
|
||||||
|
|
||||||
res.json(docs);
|
res.json(docs);
|
||||||
|
|||||||
Reference in New Issue
Block a user