Added the openapi security header to all routes that need some kind of auth
ref #6
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import csv from 'csvtojson';
|
||||
import { Body, ContentType, Controller, Param, Post, QueryParam, Req, UseBefore } from 'routing-controllers';
|
||||
import { Authorized, Body, ContentType, Controller, Param, Post, QueryParam, Req, UseBefore } from 'routing-controllers';
|
||||
import { OpenAPI, ResponseSchema } from 'routing-controllers-openapi';
|
||||
import { RunnerGroupNeededError } from '../errors/RunnerErrors';
|
||||
import { RunnerGroupNotFoundError } from '../errors/RunnerGroupErrors';
|
||||
@@ -9,7 +9,8 @@ import { ResponseRunner } from '../models/responses/ResponseRunner';
|
||||
import { RunnerController } from './RunnerController';
|
||||
|
||||
@Controller()
|
||||
//@Authorized("IMPORT:read")
|
||||
@Authorized(["RUNNER:IMPORT", "TEAM:IMPORT"])
|
||||
@OpenAPI({ security: [{ "AuthToken": [] }] })
|
||||
export class ImportController {
|
||||
private runnerController: RunnerController;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user