Finished up a wizard to create Assignments

This commit is contained in:
Tiago Ribeiro
2023-11-07 22:30:46 +00:00
parent 40f095191a
commit dd2ddc0e5b
11 changed files with 491 additions and 22 deletions

View File

@@ -23,11 +23,6 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
}
async function GET(req: NextApiRequest, res: NextApiResponse) {
if (req.session.user!.type !== "teacher") {
res.status(403).json({ok: false});
return;
}
const q = query(collection(db, "assignments"));
const snapshot = await getDocs(q);