Use Req decorator instead of Request

This avoids a clash with the Request type from express

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-02-23 21:20:01 +01:00
parent 2b14ad92cd
commit b78c94c3a1
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 20 additions and 20 deletions

View file

@ -13,7 +13,7 @@ import {
NotFoundException,
Param,
Post,
Request,
Req,
UnauthorizedException,
UploadedFile,
UseGuards,
@ -48,7 +48,7 @@ export class MediaController {
@Post()
@UseInterceptors(FileInterceptor('file'))
async uploadMedia(
@Request() req,
@Req() req,
@UploadedFile() file: MulterFile,
@Headers('HedgeDoc-Note') noteId: string,
): Promise<MediaUploadUrlDto> {
@ -80,7 +80,7 @@ export class MediaController {
@UseGuards(TokenAuthGuard)
@Delete(':filename')
async deleteMedia(
@Request() req,
@Req() req,
@Param('filename') filename: string,
): Promise<void> {
const username = req.user.userName;