add function findByCommunity en api gateway
This commit is contained in:
parent
d0fa99b49b
commit
09f774a5db
|
@ -191,6 +191,11 @@ export class AppController {
|
||||||
return this.appService.findCommonArea(paramCommonAreaId);
|
return this.appService.findCommonArea(paramCommonAreaId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('commonArea//findByCommunity/:community_id')
|
||||||
|
findByCommunity(@Param('community_id') paramCommunityId: string) {
|
||||||
|
return this.appService.findByCommunity(paramCommunityId);
|
||||||
|
}
|
||||||
|
|
||||||
// #==== API GUEST
|
// #==== API GUEST
|
||||||
//#API userService - create user
|
//#API userService - create user
|
||||||
@Post('guest/createGuest')
|
@Post('guest/createGuest')
|
||||||
|
|
|
@ -248,6 +248,16 @@ export class AppService {
|
||||||
.pipe(map((message: string) => ({ message })));
|
.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 ===============================
|
// ====================== GUESTS ===============================
|
||||||
|
|
||||||
//POST parameter from API
|
//POST parameter from API
|
||||||
|
|
Loading…
Reference in New Issue