working demo

This commit is contained in:
Siwat Sirichai 2024-05-05 18:44:40 +07:00
parent b194d2031d
commit a8de581c09
6 changed files with 216 additions and 27 deletions

View file

@ -97,6 +97,9 @@ router.get('/parent/:parent_upn', async function (req, res) {
allowedAttributes.forEach(function (attribute) {
parent[attribute] = req.user[attribute];
});
// Get the list of students linked to the parent
let students = await directory.getStudentsByParent(parent.username);
parent.students = students;
res.json(parent);
});