From 00cdc2ff8c87dfe868b264635d74332619727b3b Mon Sep 17 00:00:00 2001 From: Bryann Yeap Kok Keong Date: Wed, 9 Nov 2022 13:06:40 +0800 Subject: [PATCH] [offers][fix] Fix adding location to experience when creating offer profiles --- .../server/router/offers/offers-profile-router.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/portal/src/server/router/offers/offers-profile-router.ts b/apps/portal/src/server/router/offers/offers-profile-router.ts index 3a6a6636..e438ab63 100644 --- a/apps/portal/src/server/router/offers/offers-profile-router.ts +++ b/apps/portal/src/server/router/offers/offers-profile-router.ts @@ -351,9 +351,7 @@ export const offersProfileRouter = createRouter() level: x.level, location: { connect: { - where: { - id: x.cityId, - }, + id: x.cityId, }, }, title: x.title, @@ -409,9 +407,7 @@ export const offersProfileRouter = createRouter() jobType: x.jobType, location: { connect: { - where: { - id: x.cityId, - }, + id: x.cityId, }, }, monthlySalary: @@ -464,8 +460,8 @@ export const offersProfileRouter = createRouter() durationInMonths: x.durationInMonths, jobType: x.jobType, location: { - connect: { - where: { + location: { + connect: { id: x.cityId, }, }, @@ -2218,4 +2214,4 @@ export const offersProfileRouter = createRouter() message: 'Invalid token.', }); }, - }); \ No newline at end of file + });