forked from Yara724/api
Enforce claim beneficiary access and retire unused legacy APIs
This commit is contained in:
@@ -14,11 +14,15 @@ export class ClaimCaseDbService {
|
||||
return this.claimCaseModel.create(payload);
|
||||
}
|
||||
|
||||
async findById(id: string | Types.ObjectId): Promise<ClaimCaseDocument | null> {
|
||||
async findById(
|
||||
id: string | Types.ObjectId,
|
||||
): Promise<ClaimCaseDocument | null> {
|
||||
return this.claimCaseModel.findById(id);
|
||||
}
|
||||
|
||||
async findOne(filter: FilterQuery<ClaimCase>): Promise<ClaimCaseDocument | null> {
|
||||
async findOne(
|
||||
filter: FilterQuery<ClaimCase>,
|
||||
): Promise<ClaimCaseDocument | null> {
|
||||
return this.claimCaseModel.findOne(filter);
|
||||
}
|
||||
|
||||
@@ -54,8 +58,4 @@ export class ClaimCaseDbService {
|
||||
: this.claimCaseModel.find(filter);
|
||||
return query.exec() as Promise<ClaimCaseDocument[]>;
|
||||
}
|
||||
|
||||
async countByFilter(filter: FilterQuery<ClaimCase>): Promise<number> {
|
||||
return this.claimCaseModel.countDocuments(filter);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user