diff --git a/api/src/modules/key/key.controller.ts b/api/src/modules/key/key.controller.ts index 2f94ae4..e643868 100644 --- a/api/src/modules/key/key.controller.ts +++ b/api/src/modules/key/key.controller.ts @@ -19,35 +19,31 @@ import { Key } from 'src/model/entitites'; import { KeyHandoverPDFDataDto } from 'src/model/dto/key-handover.dto'; +@UseGuards(AuthGuard) @Controller('key') export class KeyController { constructor(private service: KeyService) {} - @UseGuards(AuthGuard) @Get() getKeys(@Req() req: AuthenticatedRequest) { return this.service.getUsersKeys(req.user); } - @UseGuards(AuthGuard) @Get('lost') getLostKeys(@Req() req: AuthenticatedRequest) { return this.service.getLostKeys(req.user); } - @UseGuards(AuthGuard) @Post() postKey(@Req() req: AuthenticatedRequest, @Body() key: Key) { return this.service.createKey(req.user, key); } - @UseGuards(AuthGuard) @Put() updateKey(@Req() req: AuthenticatedRequest, @Body() key: Key) { return this.service.updateKey(req.user, key); } - @UseGuards(AuthGuard) @Put(':id/restore') restoreKey(@Req() req: AuthenticatedRequest, @Param('id') id: string) { return this.service.restoreKey(req.user, id); @@ -56,7 +52,6 @@ export class KeyController { @Get(':id/handover/pdf') async getHandoverPDF(@Param('id') id: string, @Res() res: Response) { - console.log("GET PDF") const { pdf, response } = await this.service.getPdf(id); res.setHeader( 'Content-Type', @@ -76,7 +71,6 @@ export class KeyController { res.end(pdf); } - @UseGuards(AuthGuard) @Post(':id/handover') handoutKey( @Req() req: AuthenticatedRequest, @@ -86,13 +80,11 @@ export class KeyController { return this.service.handoverKey(req.user, body, id); } - @UseGuards(AuthGuard) @Get(':id/handover') getKeyHandouts(@Req() req: AuthenticatedRequest, @Param('id') id: string) { return this.service.getKeyHandovers(req.user, id); } - @UseGuards(AuthGuard) @Get('archive') getArchive(@Req() req: AuthenticatedRequest) { return this.service.getDeletedKeys(req.user); @@ -100,7 +92,6 @@ export class KeyController { @Post('pdf') async generatePdf(@Body() dto: KeyHandoverPDFDataDto, @Res() res: Response) { - console.log("GENERATE PDF") const { pdf, response } = await this.service.createPdf(dto); res.setHeader( @@ -121,7 +112,6 @@ export class KeyController { res.end(pdf); } - @UseGuards(AuthGuard) @Delete(':id') deleteKey(@Req() req: AuthenticatedRequest, @Param('id') id: string) { return this.service.deleteKey(req.user, id); diff --git a/api/src/modules/key/key.service.ts b/api/src/modules/key/key.service.ts index bafe55a..b570379 100644 --- a/api/src/modules/key/key.service.ts +++ b/api/src/modules/key/key.service.ts @@ -29,11 +29,8 @@ export class KeyService { private readonly configService: ConfigService, private readonly mailService: MailService, private readonly sseService: SseService, - private readonly httpService: HttpService, private readonly pdfService: PdfService - ) { - console.log("INIT KEYSERVICE") - } + ) { } get isDevelopMode(): boolean { return (this.configService.get('DEVELOP_MODE') || '').toLowerCase() == 'true'; diff --git a/api/src/shared/storage/services/pdf/pdf.service.ts b/api/src/shared/storage/services/pdf/pdf.service.ts index a9678b9..c74adae 100644 --- a/api/src/shared/storage/services/pdf/pdf.service.ts +++ b/api/src/shared/storage/services/pdf/pdf.service.ts @@ -20,7 +20,6 @@ export class PdfService { public async generatePDF(dto: KeyHandoverPDFDataDto): Promise<{ pdf: Buffer, response: AxiosResponse}> { const h = await this.handoverRepo.findOneByOrFail({ id: dto.handoverId }); const response = await this.post(`${this.STORAGESERVER}/pdf/keyhandover`, dto); - console.log(response) if (response?.data == null) { return; } h.pdfFormKey = response.data; await this.handoverRepo.save(h); diff --git a/api/src/shared/storage/storage.service.ts b/api/src/shared/storage/storage.service.ts index 0446175..6b9f0b5 100644 --- a/api/src/shared/storage/storage.service.ts +++ b/api/src/shared/storage/storage.service.ts @@ -1,11 +1,8 @@ import { Injectable } from '@nestjs/common'; -import { ConfigService } from '@nestjs/config'; @Injectable() export class StorageService { - constructor(private readonly configService: ConfigService) { - console.log(configService.get('STORAGE_HOST')) - } + constructor() {} } diff --git a/client/src/app/modules/keys/create/create.component.ts b/client/src/app/modules/keys/create/create.component.ts index c94e527..c84c0a5 100644 --- a/client/src/app/modules/keys/create/create.component.ts +++ b/client/src/app/modules/keys/create/create.component.ts @@ -112,6 +112,5 @@ export class CreateKeyComponent { async setEditKey(key: IKey) { this.createForm.patchValue(key as any); this.createForm.controls.cylinder.patchValue(this.cylinders.filter(c => key.cylinder.some(v => v.id == c.id))); - console.log(this.createForm.value) } } diff --git a/client/src/app/modules/system/system.component.ts b/client/src/app/modules/system/system.component.ts index e9368a6..0e2d27c 100644 --- a/client/src/app/modules/system/system.component.ts +++ b/client/src/app/modules/system/system.component.ts @@ -51,7 +51,6 @@ export class SystemComponent extends AgGridContainerComponent { await this.api.refreshSystems(); this.gridApi.setGridOption("loading", false); const a = await this.api.getSystemArchive(); - console.log(a) } onGridReady(params: GridReadyEvent) {