mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 12:43:12 +08:00
[offers][fix] fix create profile bug where experience not saved
This commit is contained in:
@ -284,7 +284,8 @@ export const offersProfileRouter = createRouter()
|
|||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
experiences: {
|
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.jobType === JobType.FULLTIME) {
|
||||||
if (x.companyId) {
|
if (x.companyId) {
|
||||||
return {
|
return {
|
||||||
@ -392,6 +393,7 @@ export const offersProfileRouter = createRouter()
|
|||||||
message: 'Missing fields in background experiences.',
|
message: 'Missing fields in background experiences.',
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
)
|
||||||
},
|
},
|
||||||
specificYoes: {
|
specificYoes: {
|
||||||
create: input.background.specificYoes.map((x) => {
|
create: input.background.specificYoes.map((x) => {
|
||||||
@ -546,7 +548,6 @@ export const offersProfileRouter = createRouter()
|
|||||||
profileName: uniqueName,
|
profileName: uniqueName,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return createOfferProfileResponseMapper(profile, token);
|
return createOfferProfileResponseMapper(profile, token);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user