Skip to content

Commit

Permalink
update implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
janithlahirukariyawasam committed Jan 13, 2024
1 parent 61cfd13 commit 5e826d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/controllers/mentor.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getAllMentors
} from '../services/mentor.service'
import type Profile from '../entities/profile.entity'
import Mentor from '../entities/mentor.entity'
import type Mentor from '../entities/mentor.entity'
import type { ApiResponse } from '../types'

export const mentorApplicationHandler = async (
Expand Down
4 changes: 2 additions & 2 deletions src/routes/mentor/mentor.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ const mentorRouter = express.Router()
mentorRouter.post('/', requireAuth, mentorApplicationHandler)
mentorRouter.put('/me/availability', requireAuth, mentorAvailabilityHandler)
mentorRouter.get('/:mentorId', mentorDetailsHandler)
mentorRouter.get('/',getAllMentorsHandler)
mentorRouter.get('/', getAllMentorsHandler)

export default mentorRouter
2 changes: 1 addition & 1 deletion src/services/mentor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const getAllMentors = async (
.leftJoinAndSelect('mentor.profile', 'profile')
.leftJoinAndSelect('mentor.category', 'category')
.where('mentor.state = :state', { state: 'approved' })
.andWhere('category.category = :category', { category: category })
.andWhere('category.category = :category', { category: category })

Check warning on line 209 in src/services/mentor.service.ts

View workflow job for this annotation

GitHub Actions / build

Expected property shorthand
.getMany()
}

Expand Down

0 comments on commit 5e826d3

Please sign in to comment.