YARA-1073

This commit is contained in:
SepehrYahyaee
2026-06-28 15:53:34 +03:30
parent f7f7f4548d
commit 4552450fbc
2 changed files with 21 additions and 2 deletions

View File

@@ -23,7 +23,9 @@ export class BlameRequestDbService {
return this.blameRequestModel.findOne(filter);
}
async findById(id: string | Types.ObjectId): Promise<BlameRequestDocument | null> {
async findById(
id: string | Types.ObjectId,
): Promise<BlameRequestDocument | null> {
return this.blameRequestModel.findById(id);
}
@@ -72,5 +74,11 @@ export class BlameRequestDbService {
: this.blameRequestModel.find(filter);
return query.exec() as Promise<BlameRequestDocument[]>;
}
}
async deleteMany(
filter: FilterQuery<BlameRequest>,
): Promise<{ deletedCount: number }> {
const result = await this.blameRequestModel.deleteMany(filter);
return { deletedCount: result.deletedCount };
}
}