forked from Yara724/api
YARA-1073
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user