Merge branch 'agregar-campos-area-nombre' of github.com:DeimosPr4/katoikia-app into movil

This commit is contained in:
Maria Sanchez 2022-08-23 12:03:20 -06:00
commit 05b72e071a
3 changed files with 15 additions and 2 deletions

View File

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

View File

@ -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<string>(pattern, payload)

View File

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