Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
janithlahirukariyawasam committed Nov 27, 2023
1 parent b9dee8a commit a6b6391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/admin/email.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ApplicationStatus } from '../../enums'
export const getAllMenteeEmails = async (
req: Request,
res: Response
): Promise<ApiResponse<String[]>> => {
): Promise<ApiResponse<string[]>> => {
try {
const status = req.query.status
if (
Expand Down
4 changes: 2 additions & 2 deletions src/services/admin/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ApplicationStatus } from '../../enums'

export const getAllMenteeEmailsService = async (status: ApplicationStatus | undefined): Promise<{

Check failure on line 5 in src/services/admin/email.service.ts

View workflow job for this annotation

GitHub Actions / build

Replace `status:·ApplicationStatus·|·undefined` with `⏎··status:·ApplicationStatus·|·undefined⏎`
statusCode: number
emails?: String[]
emails?: string[]
message: string
}> => {
const menteeRepositroy = dataSource.getRepository(Mentee)
Expand All @@ -16,6 +16,6 @@ export const getAllMenteeEmailsService = async (status: ApplicationStatus | unde
return {
statusCode: 200,
emails,
message: "All mentee emails with status " + status
message: 'All mentee emails with status '+ (status || 'undefined'),

Check failure on line 19 in src/services/admin/email.service.ts

View workflow job for this annotation

GitHub Actions / build

Replace `+·(status·||·'undefined'),` with `·+·(status·||·'undefined')`

Check failure on line 19 in src/services/admin/email.service.ts

View workflow job for this annotation

GitHub Actions / build

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator
}
}

0 comments on commit a6b6391

Please sign in to comment.