docs: invite students guide
This commit is contained in:
@@ -946,8 +946,6 @@ export async function acceptStudentInvite(token: string, user: TAuthUser, contex
|
||||
};
|
||||
}
|
||||
|
||||
const courseMetadata = course.metadata as { allowNewStudent?: boolean } | null;
|
||||
|
||||
if (invite.roleId !== ROLE.STUDENT) {
|
||||
throw new AppError('This invite is not valid for student enrollment', ErrorCodes.UNAUTHORIZED, 403);
|
||||
}
|
||||
@@ -956,10 +954,6 @@ export async function acceptStudentInvite(token: string, user: TAuthUser, contex
|
||||
throw new AppError('This course is not available for enrollment', ErrorCodes.VALIDATION_ERROR, 400);
|
||||
}
|
||||
|
||||
if (courseMetadata?.allowNewStudent === false) {
|
||||
throw new AppError('This course is not accepting new students', ErrorCodes.VALIDATION_ERROR, 400);
|
||||
}
|
||||
|
||||
const status = getInviteStatus(invite);
|
||||
if (status === 'REVOKED') {
|
||||
throw new AppError('This invite has been revoked', ErrorCodes.UNAUTHORIZED, 403);
|
||||
|
||||
Reference in New Issue
Block a user