Skip to content

Commit 09fbb84

Browse files
committed
feat: add delete by subject id to backend
1 parent 441bd8a commit 09fbb84

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

apps/api/src/instrument-records/instrument-records.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ export class InstrumentRecordsService {
114114
});
115115
}
116116

117+
async deleteBySubjectId(id: string, { ability }: EntityOperationOptions = {}) {
118+
return this.instrumentRecordModel.deleteMany({
119+
where: { AND: [accessibleQuery(ability, 'delete', 'InstrumentRecord')], subjectId: id }
120+
});
121+
}
122+
117123
async exists(where: Prisma.InstrumentRecordWhereInput): Promise<boolean> {
118124
return this.instrumentRecordModel.exists(where);
119125
}

0 commit comments

Comments
 (0)