agregar función "encontrar por comunidad"

This commit is contained in:
Mariela 2022-08-01 00:33:48 -06:00
parent c5dfdb480d
commit 0f983cb182
1 changed files with 5 additions and 0 deletions

View File

@ -34,4 +34,9 @@ export class CommonAreasService {
async remove(id: string) {
return this.commonAreaModel.findByIdAndRemove({ _id: id }).exec();
}
async findByCommunity(community_id: string): Promise<CommonArea[]> {
return this.commonAreaModel.find({ community_id: community_id }).exec();
}
}