You've already forked RekomenciBackend
@@ -61,3 +61,32 @@ class GetResumeInteractor:
|
||||
experience_type=resume.experience_type,
|
||||
prediction=prediction,
|
||||
)
|
||||
|
||||
|
||||
@to_data_structure
|
||||
class ResumeListItemResponse:
|
||||
position: str
|
||||
about_me: str
|
||||
key_skills: list[str]
|
||||
experience_type: ExperienceType
|
||||
|
||||
|
||||
@to_interactor
|
||||
class GetResumeListInteractor:
|
||||
identity_provider: IdentityProvider
|
||||
resume_data_gateway: ResumeDataGateway
|
||||
|
||||
async def execute(self, limit: int, offset: int) -> list[ResumeListItemResponse]:
|
||||
user = await self.identity_provider.get_current_user()
|
||||
|
||||
resumes = await self.resume_data_gateway.list_by_user_id(user.id, limit=limit, offset=offset)
|
||||
|
||||
return [
|
||||
ResumeListItemResponse(
|
||||
position=r.position,
|
||||
about_me=r.about_me,
|
||||
key_skills=r.key_skills,
|
||||
experience_type=r.experience_type,
|
||||
)
|
||||
for r in resumes
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user