Updated the backend to work
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user