diff --git a/pages/api/schedule.ts b/pages/api/schedule.ts index 51d5c50..0672c76 100644 --- a/pages/api/schedule.ts +++ b/pages/api/schedule.ts @@ -93,10 +93,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) const shifts = await prisma.shift.findMany({ where: { isActive: true, - OR: [ - { isPublished: true }, - { user: { role: 'admin' } } // Todo: example. fix this - ], + isPublished: true, + // OR: [ + // { isPublished: true }, + // { user: { role: 'admin' } } // Todo: example. fix this + // ], startTime: { gte: fromDate, //lt: toDate, @@ -251,6 +252,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) ); } catch (error) { + console.log(error); res.status(500).json({ error: "Internal Server Error" }); } } else {