agregar función 'encontrar por comunidad' en controller del servicio

This commit is contained in:
Mariela 2022-08-01 00:34:52 -06:00
parent 0f983cb182
commit d0fa99b49b
1 changed files with 6 additions and 0 deletions

View File

@ -33,4 +33,10 @@ export class CommonAreasController {
let _id = id['_id'];
return this.commonAreasService.remove(_id);
}
@MessagePattern({ cmd: 'findByCommunity' })
findByCommunity(@Payload() id: string) {
let _community_id = id['community_id'];
return this.commonAreasService.findByCommunity(_community_id);
}
}