Skip to content
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ workflows:
filters:
branches:
only:
- free
- referral-api-bug
# This is beta env for production soft releases
- "build-prod-beta":
context : org-global
Expand Down
8 changes: 4 additions & 4 deletions src/server/services/recruitCRM.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,20 +385,20 @@ export default class RecruitCRMService {
// candidate exists in growsurf
// update candidate to set referrer only if it is not set already
if (!existRes.referrer) {
growRes = await gs.updateParticipant(form.email, JSON.stringify({
growRes = await gs.updateParticipant(form.email, {
referredBy: referralCookie.referralId,
referralStatus: 'CREDIT_PENDING',
metadata: {
gigID: id,
},
}));
});
// add referral link to candidate profile in recruitCRM
if (!growRes.error) {
isReferred = true;
form.custom_fields.push({
field_id: 6, value: `https://app.growsurf.com/dashboard/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${growRes.id}`,
});
}
} else notifyKirilAndNick(growRes);
}
} else {
growRes = await gs.addParticipant(JSON.stringify({
Expand All @@ -418,7 +418,7 @@ export default class RecruitCRMService {
form.custom_fields.push({
field_id: 6, value: `https://app.growsurf.com/dashboard/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${growRes.id}`,
});
}
} else notifyKirilAndNick(growRes);
}
// finally, clear the cookie
res.cookie(config.GROWSURF_COOKIE, '', {
Expand Down