refactor(backend): Functions
This commit is contained in:
parent
5ec62554e3
commit
65c1a5e6b6
57 changed files with 172 additions and 117 deletions
|
@ -77,7 +77,7 @@ export async function getClassIdsByTeacher(username: string): Promise<string[]>
|
|||
return classes.map((cls) => cls.id);
|
||||
}
|
||||
|
||||
export async function fetchStudentsByTeacher(username: string) {
|
||||
export async function fetchStudentsByTeacher(username: string): Promise<StudentDTO[]> {
|
||||
const classes = await getClassIdsByTeacher(username);
|
||||
|
||||
return (await Promise.all(classes.map(async (id) => getClassStudents(id)))).flat();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue