fix schedule
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user