@@ -3,7 +3,7 @@ import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi';
 | 
			
		||||
import { getConnectionManager, Repository } from 'typeorm';
 | 
			
		||||
import { RunnerNotFoundError } from '../errors/RunnerErrors';
 | 
			
		||||
import { ScanIdsNotMatchingError, ScanNotFoundError } from '../errors/ScanErrors';
 | 
			
		||||
import StatsAuth from '../middlewares/StatsAuth';
 | 
			
		||||
import ScanAuth from '../middlewares/ScanAuth';
 | 
			
		||||
import { CreateScan } from '../models/actions/CreateScan';
 | 
			
		||||
import { CreateTrackScan } from '../models/actions/CreateTrackScan';
 | 
			
		||||
import { UpdateScan } from '../models/actions/UpdateScan';
 | 
			
		||||
@@ -52,7 +52,7 @@ export class ScanController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Post()
 | 
			
		||||
	@Authorized("SCAN:CREATE")
 | 
			
		||||
	@UseBefore(ScanAuth)
 | 
			
		||||
	@ResponseSchema(ResponseScan)
 | 
			
		||||
	@OpenAPI({ description: 'Create a new runner. <br> Please remeber to provide the runner\'s group\'s id.' })
 | 
			
		||||
	async post(@Body({ validate: true }) createScan: CreateScan) {
 | 
			
		||||
@@ -62,7 +62,7 @@ export class ScanController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Post("/trackscans")
 | 
			
		||||
	@UseBefore(StatsAuth)
 | 
			
		||||
	@UseBefore(ScanAuth)
 | 
			
		||||
	@ResponseSchema(ResponseScan)
 | 
			
		||||
	@OpenAPI({ description: 'Create a new track scan. <br> This is just a alias for posting /scans' })
 | 
			
		||||
	async postTrackScans(@Body({ validate: true }) createScan: CreateTrackScan) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user