mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-26 09:54:43 +10:00
release: v4.1.0
This commit is contained in:
@@ -27,7 +27,7 @@ export class ResumeGuard implements CanActivate {
|
||||
// If the resume is private and the user is authenticated and is the owner of the resume, attach the resume to the request payload.
|
||||
// Else, if either the user is not authenticated or is not the owner of the resume, throw a 404 error.
|
||||
if (resume.visibility === "private") {
|
||||
if (user && user && user.id === resume.userId) {
|
||||
if (user && user.id === resume.userId) {
|
||||
request.payload = { resume };
|
||||
} else {
|
||||
throw new NotFoundException(ErrorMessage.ResumeNotFound);
|
||||
@@ -35,7 +35,7 @@ export class ResumeGuard implements CanActivate {
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new NotFoundException(ErrorMessage.ResumeNotFound);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user