add function findByCommunity en api gateway

This commit is contained in:
Mariela 2022-08-01 00:37:05 -06:00
parent d0fa99b49b
commit 09f774a5db
2 changed files with 15 additions and 0 deletions

View File

@ -191,6 +191,11 @@ export class AppController {
return this.appService.findCommonArea(paramCommonAreaId);
}
@Get('commonArea//findByCommunity/:community_id')
findByCommunity(@Param('community_id') paramCommunityId: string) {
return this.appService.findByCommunity(paramCommunityId);
}
// #==== API GUEST
//#API userService - create user
@Post('guest/createGuest')

View File

@ -248,6 +248,16 @@ export class AppService {
.pipe(map((message: string) => ({ message })));
}
//GET parameter from API
findByCommunity(paramCommunityId: string) {
const pattern = { cmd: 'findByCommunity' };
const payload = { community_id: paramCommunityId };
return this.clientCommonAreaApp
.send<string>(pattern, payload)
.pipe(map((message: string) => ({ message })));
}
// ====================== GUESTS ===============================
//POST parameter from API