feat(): prediction pipeline

This commit is contained in:
gitgernit
2025-11-23 04:11:52 +03:00
parent 2e6214a5ec
commit d1c7641698
25 changed files with 224 additions and 244 deletions
@@ -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