feat(users,professors): add promote student to professor and full student profile aggregation

This commit is contained in:
2026-08-24 22:52:38 +03:30
parent 282dd42422
commit dca7250be0
8 changed files with 401 additions and 2 deletions
@@ -9,6 +9,12 @@ exports.create = catchAsync(async (req, res, next) => {
return successResponse(res, 201, 'Professor created successfully', professor);
});
exports.createFromUser = catchAsync(async (req, res, next) => {
const userId = req.body.userId || req.params.userId || req.body.id;
const result = await professorService.createProfessorFromUser(userId, req.body);
return successResponse(res, 201, 'Professor created from user successfully', result);
});
exports.getOne = catchAsync(async (req, res, next) => {
const professor = await professorService.getProfessorById(req.params.id);
return successResponse(res, 200, 'Professor retrieved successfully', professor);