From 951031592ca9c4d7da866c27aca178d874d275e5 Mon Sep 17 00:00:00 2001 From: Mariela Date: Mon, 22 Aug 2022 17:57:55 -0600 Subject: [PATCH] 2 --- api-gateway/src/app.controller.ts | 38 ++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/api-gateway/src/app.controller.ts b/api-gateway/src/app.controller.ts index 5ebc741f..647eca29 100644 --- a/api-gateway/src/app.controller.ts +++ b/api-gateway/src/app.controller.ts @@ -208,6 +208,26 @@ export class AppController { return this.appService.changeStatusUser(pId, pStatus); } + @Put('user/updateAdminCommunity/:id') + updateAdminCommunity( + @Param('_id') id: string, + @Body('dni') dni: string, + @Body('name') name: string, + @Body('last_name') last_name: string, + @Body('email') email: string, + @Body('phone') phone: number, + @Body('community_id') community_id: string, + ) { + return this.appService.updateAdminCommunity( + id, + dni, + name, + last_name, + email, + phone, + community_id, + ); + } // #==== API Communities @Post('community/createCommunity') createCommunity( @@ -261,7 +281,23 @@ export class AppController { return this.appService.changeStatusCommunity(pId, pStatus); } - + @Get('community/findHousesCommunity/:id') + findHousesCommunity( + @Param('id') community_id: string, + ) { + return this.appService.findHousesCommunity(community_id); + } + + @Post('community/saveTenant') + saveTenant( + @Body('community_id') community_id: string, + @Body('number_house') number_house: string, + @Body('tenant_id') tenant_id: string, + ) { + return this.appService.saveTenant(community_id, number_house, tenant_id); + } + + // #==== API Common Areas @Post('commonArea/createCommonArea') createCommonArea(