Skip to content

Commit 8ae75d0

Browse files
committed
feat: remove unused deleteBySubjectId
1 parent fa37d39 commit 8ae75d0

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ export class InstrumentRecordsController {
6060
await this.instrumentRecordsService.deleteById(id, { ability });
6161
}
6262

63-
@ApiOperation({ summary: 'Delete by Subject' })
64-
@Delete('bySubject/:subjectId')
65-
@HttpCode(HttpStatus.NO_CONTENT)
66-
@RouteAccess({ action: 'delete', subject: 'InstrumentRecord' })
67-
async deleteBySubjectId(
68-
@Param('subjectId', ValidObjectIdPipe) subjectId: string,
69-
@CurrentUser('ability') ability: AppAbility
70-
) {
71-
await this.instrumentRecordsService.deleteById(subjectId, { ability });
72-
}
73-
7463
@ApiOperation({ summary: 'Export Records' })
7564
@Get('export')
7665
@RouteAccess({ action: 'read', subject: 'InstrumentRecord' })

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ export class InstrumentRecordsService {
122122
});
123123
}
124124

125-
async deleteBySubjectId(id: string, { ability }: EntityOperationOptions = {}) {
126-
return this.instrumentRecordModel.deleteMany({
127-
where: { AND: [accessibleQuery(ability, 'delete', 'InstrumentRecord')], subjectId: id }
128-
});
129-
}
130-
131125
async exists(where: Prisma.InstrumentRecordWhereInput): Promise<boolean> {
132126
return this.instrumentRecordModel.exists(where);
133127
}

0 commit comments

Comments
 (0)