feat: teacher's assignments full stack geimplementeerd
This commit is contained in:
parent
509dd6bfab
commit
c03669eda7
5 changed files with 49 additions and 0 deletions
|
@ -7,6 +7,7 @@ import {
|
|||
getJoinRequestsByClass,
|
||||
getStudentsByTeacher,
|
||||
getTeacher,
|
||||
getTeacherAssignments,
|
||||
getTeacherQuestions,
|
||||
updateClassJoinRequestStatus,
|
||||
} from '../services/teachers.js';
|
||||
|
@ -60,6 +61,16 @@ export async function getTeacherClassHandler(req: Request, res: Response): Promi
|
|||
res.json({ classes });
|
||||
}
|
||||
|
||||
export async function getTeacherAssignmentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const username = req.params.username;
|
||||
const full = req.query.full === 'true';
|
||||
requireFields({ username });
|
||||
|
||||
const assignments = await getTeacherAssignments(username, full);
|
||||
|
||||
res.json({ assignments });
|
||||
}
|
||||
|
||||
export async function getTeacherStudentHandler(req: Request, res: Response): Promise<void> {
|
||||
const username = req.params.username;
|
||||
const full = req.query.full === 'true';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue