feat(professors,sms): merge professor with users, add existing user link, professor portal endpoint, and SMS bypass list
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user