Fixed Creation of normal scans

ref #67
This commit is contained in:
niggl committed 2021-01-07 16:32:16 +01:00
1 parent a2c3913601
commit 30502ec949
4 files changed
+62 -8

No files matched your search

+3 -2
View File
@@ -52,8 +52,9 @@ export class ScanController {
@OpenAPI({ description: 'Create a new runner. <br> Please remeber to provide the runner\'s group\'s id.' })
async post(@Body({ validate: true }) createScan: CreateScan) {
let scan = await createScan.toScan();
scan = await this.scanRepository.save(scan)
return (await this.scanRepository.findOne(scan)).toResponse();
scan = await this.scanRepository.save(scan);
console.log(scan);
return (await this.scanRepository.findOne({ id: scan.id })).toResponse();
}
// @Put('/:id')