feat: add, delete student route met user logic + .js in files

This commit is contained in:
Gabriellvl 2025-03-09 20:18:11 +01:00
parent e0a5596994
commit ecad27ea4d
29 changed files with 301 additions and 159 deletions

View file

@ -1,6 +1,5 @@
import { Request, Response } from 'express';
import { getAllClasses, getClass, getClassStudents, getClassTeacherInvitations } from '../services/class';
import { ClassDTO } from '../interfaces/classes';
import { getAllClasses, getClass, getClassStudents, getClassTeacherInvitations } from '../services/class.js';
export async function getAllClassesHandler(
req: Request,
@ -61,10 +60,10 @@ export async function getTeacherInvitationsHandler(
): Promise<void> {
const classId = req.params.id;
const full = req.query.full === "true"; // TODO: not implemented yet
const invitations = await getClassTeacherInvitations(classId, full);
res.json({
invitations: invitations,
});
}
}