eliminación lógica en comunidades

This commit is contained in:
Mariela 2022-07-31 17:18:56 -06:00
parent 14df451c0a
commit 2519136654
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ export class CommunitiesService {
} }
async remove(id: string) { async remove(id: string) {
return this.communityModel.findByIdAndRemove({ _id: id }).exec(); return this.communityModel.findOneAndUpdate({ _id: id }, {status: '-1'}, {
new: true,
});
} }
async findCommunityAdmin(community: string, user_type: string) { async findCommunityAdmin(community: string, user_type: string) {