More scan request optimizations

This commit is contained in:
2023-04-15 20:51:13 +02:00
parent 8007117434
commit 7c4ff42a3b

View File

@@ -36,7 +36,7 @@ export class ScanController {
@OpenAPI({ description: 'Lists all scans (normal or track) from all runners. <br> This includes the scan\'s runner\'s distance ran.' })
async getAll() {
let responseScans: ResponseScan[] = new Array<ResponseScan>();
const scans = await this.scanRepository.find({ relations: ['runner', 'track', 'runner.group', 'card', 'station'] });
const scans = await this.scanRepository.find({ relations: ['runner', 'track'] });
scans.forEach(scan => {
responseScans.push(scan.toResponse());
});