Implemented cascading scan, track and card deletion

ref #78
This commit is contained in:
2021-01-09 15:43:52 +01:00
parent 9013b9492c
commit 3d07aac944
5 changed files with 20 additions and 6 deletions

View File

@@ -94,9 +94,9 @@ export class TrackController {
if (trackStations.length != 0 && !force) {
throw new TrackHasScanStationsError();
}
const scanController = new ScanStationController;
const stationController = new ScanStationController;
for (let station of trackStations) {
scanController.remove(station.id, force);
await stationController.remove(station.id, force);
}
await this.trackRepository.delete(track);