Replies: 2 comments 6 replies
-
It seems you are calling the Scott |
Beta Was this translation helpful? Give feedback.
1 reply
-
@smolinari to call .deleteOne i am using a model on the service : @Injectable()
export class ArticleService {
constructor(
@InjectModel(ArticleModel)
private readonly articleModel: ReturnModelType<typeof ArticleModel>
)
delete = async (_id: mongoose.Types.ObjectId): Promise<any> => {
try {
return await this.articleModel
.deleteOne({ _id })
.exec();
} catch (e) {
throw e;
}
};
} |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using hook when try to delete a doc, how can i get this object of doc ??
and if not accept object param
{ document: false, query: true }
so code bellow not working !!any idea to fixe this issue ?
Beta Was this translation helpful? Give feedback.
All reactions