You've already forked RekomenciBackend
feat(): update resume contracts
This commit is contained in:
@@ -58,18 +58,30 @@ class TestApiGateway:
|
||||
self,
|
||||
access_token: str,
|
||||
position: str,
|
||||
location: str,
|
||||
about_me: str,
|
||||
key_skills: list[str],
|
||||
experience_type: str,
|
||||
experience: list[dict[str, Any]] | None = None,
|
||||
education: list[dict[str, Any]] | None = None,
|
||||
projects: list[dict[str, Any]] | None = None,
|
||||
) -> Response:
|
||||
json_data: dict[str, Any] = {
|
||||
"position": position,
|
||||
"location": location,
|
||||
"about_me": about_me,
|
||||
"key_skills": key_skills,
|
||||
"experience_type": experience_type,
|
||||
}
|
||||
if experience is not None:
|
||||
json_data["experience"] = experience
|
||||
if education is not None:
|
||||
json_data["education"] = education
|
||||
if projects is not None:
|
||||
json_data["projects"] = projects
|
||||
return await self._client.post(
|
||||
"/resume",
|
||||
json={
|
||||
"position": position,
|
||||
"about_me": about_me,
|
||||
"key_skills": key_skills,
|
||||
"experience_type": experience_type,
|
||||
},
|
||||
json=json_data,
|
||||
headers=make_auth_headers(access_token),
|
||||
)
|
||||
|
||||
@@ -84,22 +96,34 @@ class TestApiGateway:
|
||||
access_token: str,
|
||||
resume_id: str,
|
||||
position: str | None = None,
|
||||
location: str | None = None,
|
||||
about_me: str | None = None,
|
||||
key_skills: list[str] | None = None,
|
||||
experience_type: str | None = None,
|
||||
experience: list[dict[str, Any]] | None = None,
|
||||
education: list[dict[str, Any]] | None = None,
|
||||
projects: list[dict[str, Any]] | None = None,
|
||||
) -> Response:
|
||||
json_data: dict[str, Any] = {}
|
||||
if position is not None:
|
||||
json_data["position"] = position
|
||||
if location is not None:
|
||||
json_data["location"] = location
|
||||
if about_me is not None:
|
||||
json_data["about_me"] = about_me
|
||||
if key_skills is not None:
|
||||
json_data["key_skills"] = key_skills
|
||||
if experience_type is not None:
|
||||
json_data["experience_type"] = experience_type
|
||||
if experience is not None:
|
||||
json_data["experience"] = experience
|
||||
if education is not None:
|
||||
json_data["education"] = education
|
||||
if projects is not None:
|
||||
json_data["projects"] = projects
|
||||
return await self._client.patch(
|
||||
f"/resume/{resume_id}",
|
||||
json={
|
||||
key: value
|
||||
for key, value in {
|
||||
"position": position,
|
||||
"about_me": about_me,
|
||||
"key_skills": key_skills,
|
||||
"experience_type": experience_type,
|
||||
}.items()
|
||||
if value is not None
|
||||
},
|
||||
json=json_data,
|
||||
headers=make_auth_headers(access_token),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user