mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 04:33:42 +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: {
|
||||
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);
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user