[offers][fix] fix create profile bug where experience not saved

pull/436/head
Stuart Long Chay Boon 2 years ago
parent f48a34e88a
commit 0db31eb0c1

@ -284,7 +284,8 @@ export const offersProfileRouter = createRouter()
})),
},
experiences: {
create: input.background.experiences.map(async (x) => {
create: await Promise.all(
input.background.experiences.map(async (x) => {
if (x.jobType === JobType.FULLTIME) {
if (x.companyId) {
return {
@ -392,6 +393,7 @@ export const offersProfileRouter = createRouter()
message: 'Missing fields in background experiences.',
});
}),
)
},
specificYoes: {
create: input.background.specificYoes.map((x) => {
@ -546,7 +548,6 @@ export const offersProfileRouter = createRouter()
profileName: uniqueName,
},
});
return createOfferProfileResponseMapper(profile, token);
},
})

Loading…
Cancel
Save