in edu-analytics-be/web/app/controller/educatorController.js [181:194]
static async enrollStudentToCourse(req, res, next) {
try {
const token = req.get('Authorization');
const data = await EducatorEntity.enrollStudentToCourse(token, req.body);
if (data) {
res.status(201).send(data);
} else {
res.status(400).send(data);
}
} catch (err) {
next(err);
}
}