From e3b50e63d5109e967dbbbf82fe306a4bd0d9a307 Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 23 Aug 2022 11:52:18 -0600 Subject: [PATCH] add nuevas columnas --- api-gateway/src/app.controller.ts | 4 ++++ api-gateway/src/app.service.ts | 6 ++++-- servicio-reservaciones/src/schemas/reservation.schema.ts | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/api-gateway/src/app.controller.ts b/api-gateway/src/app.controller.ts index f0feefba..e53d3fb4 100644 --- a/api-gateway/src/app.controller.ts +++ b/api-gateway/src/app.controller.ts @@ -476,6 +476,8 @@ export class AppController { @Body('date_entry') date_entry: Date, @Body('user_id') user_id: string, @Body('common_area_id') common_area_id: string, + @Body('common_area_name') common_area_name: string, + @Body('communty_id') communty_id: string, ) { return this.appService.createReservation( start_time, @@ -484,6 +486,8 @@ export class AppController { date_entry, user_id, common_area_id, + common_area_name, + communty_id, ); } diff --git a/api-gateway/src/app.service.ts b/api-gateway/src/app.service.ts index 2ce6a609..7aa40f38 100644 --- a/api-gateway/src/app.service.ts +++ b/api-gateway/src/app.service.ts @@ -589,11 +589,13 @@ export class AppService { //POST parameter from API createReservation(start_time: string, finish_time: string, status: string, - date_entry: Date, user_id: string, common_area_id: string) { + date_entry: Date, user_id: string, common_area_id: string, + common_area_name: string, communty_id: string) { const pattern = { cmd: 'createReservation' }; const payload = { start_time: start_time, finish_time: finish_time, status: status, - date_entry: date_entry, user_id: user_id, common_area_id: common_area_id + date_entry: date_entry, user_id: user_id, common_area_id: common_area_id, + common_area_name: common_area_name, communty_id: communty_id }; return this.clientReservationApp .send(pattern, payload) diff --git a/servicio-reservaciones/src/schemas/reservation.schema.ts b/servicio-reservaciones/src/schemas/reservation.schema.ts index 542eb422..d7deb35a 100644 --- a/servicio-reservaciones/src/schemas/reservation.schema.ts +++ b/servicio-reservaciones/src/schemas/reservation.schema.ts @@ -20,6 +20,13 @@ export class Reservation { @Prop() common_area_id: string; + @Prop() + common_area_name: string; + + + @Prop() + community_id: string; + @Prop() user_id: string; }