parent
70a379edef
commit
e1ce052d3c
|
@ -59,7 +59,7 @@ export class ScanController {
|
|||
async post(@Body({ validate: true }) createScan: CreateScan) {
|
||||
let scan = await createScan.toScan();
|
||||
scan = await this.scanRepository.save(scan);
|
||||
return (await this.scanRepository.findOne({ id: scan.id }, { relations: ['runner'] })).toResponse();
|
||||
return (await this.scanRepository.findOne({ id: scan.id }, { relations: ['runner', 'runner.scans', 'runner.scans.track'] })).toResponse();
|
||||
}
|
||||
|
||||
@Post("/trackscans")
|
||||
|
@ -68,7 +68,9 @@ export class ScanController {
|
|||
@ResponseSchema(RunnerNotFoundError, { statusCode: 404 })
|
||||
@OpenAPI({ description: 'Create a new track scan. <br> This is just a alias for posting /scans', security: [{ "ScanApiToken": [] }, { "AuthToken": [] }, { "RefreshTokenCookie": [] }] })
|
||||
async postTrackScans(@Body({ validate: true }) createScan: CreateTrackScan) {
|
||||
return this.post(createScan);
|
||||
let scan = await createScan.toScan();
|
||||
scan = await this.scanRepository.save(scan);
|
||||
return (await this.scanRepository.findOne({ id: scan.id }, { relations: ['runner', 'track', 'runner.scans', 'runner.scans.track'] })).toResponse();
|
||||
}
|
||||
|
||||
@Put('/:id')
|
||||
|
|
Loading…
Reference in New Issue