agregar función "encontrar por comunidad"
This commit is contained in:
parent
c5dfdb480d
commit
0f983cb182
|
@ -34,4 +34,9 @@ export class CommonAreasService {
|
||||||
async remove(id: string) {
|
async remove(id: string) {
|
||||||
return this.commonAreaModel.findByIdAndRemove({ _id: id }).exec();
|
return this.commonAreaModel.findByIdAndRemove({ _id: id }).exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async findByCommunity(community_id: string): Promise<CommonArea[]> {
|
||||||
|
return this.commonAreaModel.find({ community_id: community_id }).exec();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue