feat(professors,sms): merge professor with users, add existing user link, professor portal endpoint, and SMS bypass list

This commit is contained in:
2026-08-25 03:48:19 +03:30
parent b708a6b777
commit 0a022c0917
14 changed files with 865 additions and 205 deletions
@@ -1,4 +1,5 @@
// /components/professors/professorController.js
'use strict';
const catchAsync = require('../../utils/catchAsync');
const professorService = require('./professorService');
@@ -39,3 +40,9 @@ exports.search = catchAsync(async (req, res, next) => {
const { data, meta } = await professorService.searchProfessors(req.query);
return listResponse(res, 200, data, meta);
});
exports.getPortal = catchAsync(async (req, res, next) => {
const userId = req.user?._id;
const data = await professorService.getProfessorPortalData(userId);
return successResponse(res, 200, 'Professor teaching portal data retrieved successfully', data);
});