From 9854e1279dd187f3aa10261bd58f6a5119cec606 Mon Sep 17 00:00:00 2001 From: Janith Lahiru Kariyawasam <88109775+janithlahirukariyawasam@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:47:33 +0530 Subject: [PATCH] improve code quality --- src/routes/admin/mentee/mentee.route.ts | 6 ++---- src/services/admin/email.service.ts | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/routes/admin/mentee/mentee.route.ts b/src/routes/admin/mentee/mentee.route.ts index 8bf84311..677150b1 100644 --- a/src/routes/admin/mentee/mentee.route.ts +++ b/src/routes/admin/mentee/mentee.route.ts @@ -1,11 +1,9 @@ import express from 'express' import { requireAuth } from '../../../controllers/auth.controller' -import { - getAllMenteeEmails, -} from '../../../controllers/admin/email.controller' +import { getAllMenteeEmails } from '../../../controllers/admin/email.controller' const menteeRouter = express.Router() -menteeRouter.get('/emails/', /*requireAuth,*/ getAllMenteeEmails) +menteeRouter.get('/emails/', requireAuth, getAllMenteeEmails) export default menteeRouter diff --git a/src/services/admin/email.service.ts b/src/services/admin/email.service.ts index 32fa7cef..fceaff0d 100644 --- a/src/services/admin/email.service.ts +++ b/src/services/admin/email.service.ts @@ -18,6 +18,6 @@ export const getAllMenteeEmailsService = async ( return { statusCode: 200, emails, - message: 'All mentee emails with status ' + (status || 'undefined') + message: 'All mentee emails with status ' + (status ?? 'undefined') } }