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

@ -64,6 +64,8 @@ router.get('/student/:upn', function (req, res) {
allowedAttributes.forEach(function (attribute) {
student[attribute] = req.user[attribute];
});
// Return the student's linked parent in the response in JSON format
student['primary_parent'] = req.user['primaryParent'];
res.json(student);
});