nuevos items

This commit is contained in:
Mariela 2022-08-25 00:06:38 -06:00
parent 0a7cc3c1db
commit 594b59227d
3 changed files with 8 additions and 8 deletions

View File

@ -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,

View File

@ -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
};

View File

@ -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;