nuevos items
This commit is contained in:
parent
0a7cc3c1db
commit
594b59227d
|
@ -505,8 +505,8 @@ export class AppController {
|
||||||
|
|
||||||
@Post('reservation/createReservation')
|
@Post('reservation/createReservation')
|
||||||
createReservation(
|
createReservation(
|
||||||
@Body('start_time') start_time: string,
|
@Body('date') date: string,
|
||||||
@Body('finish_time') finish_time: string,
|
@Body('time') time: string,
|
||||||
@Body('status') status: string,
|
@Body('status') status: string,
|
||||||
@Body('date_entry') date_entry: Date,
|
@Body('date_entry') date_entry: Date,
|
||||||
@Body('user_id') user_id: string,
|
@Body('user_id') user_id: string,
|
||||||
|
@ -515,8 +515,8 @@ export class AppController {
|
||||||
@Body('communty_id') communty_id: string,
|
@Body('communty_id') communty_id: string,
|
||||||
) {
|
) {
|
||||||
return this.appService.createReservation(
|
return this.appService.createReservation(
|
||||||
start_time,
|
date,
|
||||||
finish_time,
|
time,
|
||||||
status,
|
status,
|
||||||
date_entry,
|
date_entry,
|
||||||
user_id,
|
user_id,
|
||||||
|
|
|
@ -613,12 +613,12 @@ export class AppService {
|
||||||
// ====================== RESERVATIONS ===============================
|
// ====================== RESERVATIONS ===============================
|
||||||
|
|
||||||
//POST parameter from API
|
//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,
|
date_entry: Date, user_id: string, common_area_id: string,
|
||||||
common_area_name: string, communty_id: string) {
|
common_area_name: string, communty_id: string) {
|
||||||
const pattern = { cmd: 'createReservation' };
|
const pattern = { cmd: 'createReservation' };
|
||||||
const payload = {
|
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,
|
date_entry: date_entry, user_id: user_id, common_area_id: common_area_id,
|
||||||
common_area_name: common_area_name, communty_id: communty_id
|
common_area_name: common_area_name, communty_id: communty_id
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,10 +6,10 @@ export type ReservationDocument = Reservation & Document;
|
||||||
@Schema({ collection: 'reservations' })
|
@Schema({ collection: 'reservations' })
|
||||||
export class Reservation {
|
export class Reservation {
|
||||||
@Prop()
|
@Prop()
|
||||||
start_time: string;
|
date: string;
|
||||||
|
|
||||||
@Prop()
|
@Prop()
|
||||||
finish_time: string;
|
time: string;
|
||||||
|
|
||||||
@Prop()
|
@Prop()
|
||||||
status: string;
|
status: string;
|
||||||
|
|
Loading…
Reference in New Issue