Skip to content

return resume instead of resumeLink in TeamService.getTeamJob #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2310,12 +2310,12 @@ components:
id:
type: string
format: uuid
description: "The job cadidate id."
description: "The job candidate id."
userId:
type: string
format: uuid
description: "User id."
resumeLink:
resume:
type: string
format: url
description: 'The link for the resume that can be downloaded'
Expand Down
2 changes: 1 addition & 1 deletion src/services/TeamService.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ async function getTeamJob (currentUser, id, jobId) {
const members = await helper.getMembers(userHandles)

for (const item of candidates) {
item.resumeLink = null
const candidate = _.find(job.candidates, { userId: item.id })
// TODO this logic should be vice-verse, we should loop trough candidates and populate users data if found,
// not loop through users and populate candidates data if found
if (candidate) {
item.resume = candidate.resume
item.status = candidate.status
// return User id as `userId` and JobCandidate id as `id`
item.userId = item.id
Expand Down