-
-
Notifications
You must be signed in to change notification settings - Fork 219
fix: restore access to confirm mentor registration #2870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
4c2178b to
c0d75f5
Compare
| } | ||
| const courseToConfirm = await new CoursesApi().getCourseByAlias(alias as string); | ||
| const isInvited = mentor?.preselectedCourses?.includes(courseToConfirm?.data.id) ?? false; | ||
| return isInvited; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
return !!mentor?.preselectedCourses?.includes(courseToConfirm?.data.id);| <ActiveCourseProvider | ||
| publicRoutes={['/login', '/registry/mentor', '/registry/student', '/course/mentor/confirm']} | ||
| publicRoutes={['/login', '/registry/mentor', '/registry/student']} | ||
| mentorConfirmRoute="/course/mentor/confirm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This route was excluded from the publicRoutes, but some children render depends on publicRoutes:
if (isPublicRoute && router.isReady) {
return <>{children}</>;
}Is it expected?
| @ApiForbiddenResponse() | ||
| @ApiOkResponse({ type: CourseDto }) | ||
| @UseGuards(DefaultGuard) | ||
| public async getByAlias(@Req() _: CurrentRequest, @Param('courseAlias') courseAlias: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the request object used here?
|
@aliakseitokarev please resolve code review concers and merge conflicts and we're good to go :) |
Pull Request Guidelines
Issue:
Mentor can't accept the invitation.
Description:
Add the mentorConfirmRoute to ActiveCourseProvider, incorporating the necessary checks.
Self-Check: