Updated the backend to work

This commit is contained in:
Tiago Ribeiro
2023-09-28 14:45:42 +01:00
parent 169ae2c959
commit a47ee28ca5

View File

@@ -21,7 +21,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const {module, avoidRepeated} = req.query as {module: string; avoidRepeated: string}; const {module, avoidRepeated} = req.query as {module: string; avoidRepeated: string};
const moduleRef = collection(db, module); const moduleRef = collection(db, module);
const q = query(moduleRef, where("isDiagnostic", "==", true)); const q = query(moduleRef, where("isDiagnostic", "==", false));
const snapshot = await getDocs(q); const snapshot = await getDocs(q);
const exams: Exam[] = shuffle( const exams: Exam[] = shuffle(