From 594b59227d6ad8e8e7c1e65e9f954db45c49cf58 Mon Sep 17 00:00:00 2001 From: Mariela Date: Thu, 25 Aug 2022 00:06:38 -0600 Subject: [PATCH] nuevos items --- api-gateway/src/app.controller.ts | 8 ++++---- api-gateway/src/app.service.ts | 4 ++-- servicio-reservaciones/src/schemas/reservation.schema.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api-gateway/src/app.controller.ts b/api-gateway/src/app.controller.ts index 76e6d442..39e794ae 100644 --- a/api-gateway/src/app.controller.ts +++ b/api-gateway/src/app.controller.ts @@ -505,8 +505,8 @@ export class AppController { @Post('reservation/createReservation') createReservation( - @Body('start_time') start_time: string, - @Body('finish_time') finish_time: string, + @Body('date') date: string, + @Body('time') time: string, @Body('status') status: string, @Body('date_entry') date_entry: Date, @Body('user_id') user_id: string, @@ -515,8 +515,8 @@ export class AppController { @Body('communty_id') communty_id: string, ) { return this.appService.createReservation( - start_time, - finish_time, + date, + time, status, date_entry, user_id, diff --git a/api-gateway/src/app.service.ts b/api-gateway/src/app.service.ts index 50beb9f6..2a843756 100644 --- a/api-gateway/src/app.service.ts +++ b/api-gateway/src/app.service.ts @@ -613,12 +613,12 @@ export class AppService { // ====================== RESERVATIONS =============================== //POST parameter from API - createReservation(start_time: string, finish_time: string, status: string, + createReservation(date: string, time: string, status: 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: date, time: time, status: status, date_entry: date_entry, user_id: user_id, common_area_id: common_area_id, common_area_name: common_area_name, communty_id: communty_id }; diff --git a/servicio-reservaciones/src/schemas/reservation.schema.ts b/servicio-reservaciones/src/schemas/reservation.schema.ts index c51bf2d9..c5acc3c4 100644 --- a/servicio-reservaciones/src/schemas/reservation.schema.ts +++ b/servicio-reservaciones/src/schemas/reservation.schema.ts @@ -6,10 +6,10 @@ export type ReservationDocument = Reservation & Document; @Schema({ collection: 'reservations' }) export class Reservation { @Prop() - start_time: string; + date: string; @Prop() - finish_time: string; + time: string; @Prop() status: string;