Implemented basic auth

ref #26
This commit is contained in:
2021-02-13 16:09:58 +01:00
parent e306cdb2c8
commit bdeadd274b
4 changed files with 40 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { Body, JsonController, Post, QueryParam, Res } from 'routing-controllers';
import { Authorized, Body, JsonController, Post, QueryParam, Res } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { Runner } from '../models/Runner';
import { RunnerCard } from '../models/RunnerCard';
@@ -10,6 +10,7 @@ import { PdfCreator } from '../PdfCreator';
* All endpoints have to accept a locale query-param to support i18n.
*/
@JsonController()
@Authorized()
export class PdfController {
private pdf: PdfCreator = new PdfCreator();
private initialized: boolean = false;