You've already forked RekomenciBackend
feat(): prediction pipeline
This commit is contained in:
@@ -12,7 +12,7 @@ from template_project.application.resume.data_gateway import (
|
||||
ResumeProjectDataGateway,
|
||||
)
|
||||
from template_project.application.resume.entity import ResumeId
|
||||
from template_project.application.resume.errors import ResumeDoesBelongUserError
|
||||
from template_project.application.resume.errors import ResumeDoesBelongUserError, ResumeNotFoundError
|
||||
|
||||
|
||||
@to_data_structure
|
||||
@@ -72,7 +72,9 @@ class GetResumeInteractor:
|
||||
) -> GetResumeResponse:
|
||||
user = await self.identity_provider.get_current_user()
|
||||
|
||||
resume = await self.resume_data_gateway.load(resume_id)
|
||||
resume = await self.resume_data_gateway.load_by_resume_id(resume_id)
|
||||
if resume is None:
|
||||
raise ResumeNotFoundError(resume_id=resume_id)
|
||||
|
||||
if resume.user_id != user.id:
|
||||
raise ResumeDoesBelongUserError
|
||||
@@ -167,7 +169,9 @@ class GetResumeHistoryInteractor:
|
||||
async def execute(self, resume_id: ResumeId) -> list[ResumeListItemResponse]:
|
||||
user = await self.identity_provider.get_current_user()
|
||||
|
||||
resume = await self.resume_data_gateway.load(resume_id)
|
||||
resume = await self.resume_data_gateway.load_by_resume_id(resume_id)
|
||||
if resume is None:
|
||||
raise ResumeNotFoundError(resume_id=resume_id)
|
||||
if resume.user_id != user.id:
|
||||
raise ResumeDoesBelongUserError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user