[offers][fix] Fix adding location to experience when creating offer profiles

pull/551/head
Bryann Yeap Kok Keong 3 years ago
parent 1db5e46fcf
commit 00cdc2ff8c

@ -351,11 +351,9 @@ export const offersProfileRouter = createRouter()
level: x.level, level: x.level,
location: { location: {
connect: { connect: {
where: {
id: x.cityId, id: x.cityId,
}, },
}, },
},
title: x.title, title: x.title,
totalCompensation: totalCompensation:
x.totalCompensation != null x.totalCompensation != null
@ -409,11 +407,9 @@ export const offersProfileRouter = createRouter()
jobType: x.jobType, jobType: x.jobType,
location: { location: {
connect: { connect: {
where: {
id: x.cityId, id: x.cityId,
}, },
}, },
},
monthlySalary: monthlySalary:
x.monthlySalary != null x.monthlySalary != null
? { ? {
@ -463,9 +459,9 @@ export const offersProfileRouter = createRouter()
return { return {
durationInMonths: x.durationInMonths, durationInMonths: x.durationInMonths,
jobType: x.jobType, jobType: x.jobType,
location: {
location: { location: {
connect: { connect: {
where: {
id: x.cityId, id: x.cityId,
}, },
}, },

Loading…
Cancel
Save