fix eliminación lógica
This commit is contained in:
parent
e59678d689
commit
bb05560668
|
@ -32,8 +32,10 @@ export class CommonAreasService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async remove(id: string) {
|
async remove(id: string) {
|
||||||
return this.commonAreaModel.findByIdAndRemove({ _id: id }).exec();
|
return this.commonAreaModel.findOneAndUpdate({ _id: id }, {status: '-1'}, {
|
||||||
}
|
new: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
async findByCommunity(community_id: string): Promise<CommonArea[]> {
|
async findByCommunity(community_id: string): Promise<CommonArea[]> {
|
||||||
return this.commonAreaModel.find({ community_id: community_id }).exec();
|
return this.commonAreaModel.find({ community_id: community_id }).exec();
|
||||||
|
|
Loading…
Reference in New Issue