Closed sathudeva7 closed 11 months ago
The purpose of this PR is to fix #28
This issue involves implementing an API to get all mentors. The endpoint should allow Admin to make a PUT request to /api/admin/mentor/{{mentorId}}/availability.
const existingMentor = await mentorRepository.findOne({ where: { uuid: mentorId }, select: [ 'application', 'state', 'availability', 'uuid', 'category', 'profile', 'created_at' ], relations: ['category', 'profile'] }) if (!existingMentor) { return { statusCode: 404, message: 'Mentor not found' } } existingMentor.availability = availability const mentor = await mentorRepository.save(existingMentor)
Purpose
The purpose of this PR is to fix #28
Goals
This issue involves implementing an API to get all mentors. The endpoint should allow Admin to make a PUT request to /api/admin/mentor/{{mentorId}}/availability.
Approach
Screenshots
Checklist
Related PRs
## Test environment ## Learning