mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Add explicit Request type
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b78c94c3a1
commit
ba4825a99f
4 changed files with 22 additions and 18 deletions
|
@ -20,6 +20,7 @@ import {
|
|||
UseInterceptors,
|
||||
} from '@nestjs/common';
|
||||
import { FileInterceptor } from '@nestjs/platform-express';
|
||||
import { Request } from 'express';
|
||||
import {
|
||||
ClientError,
|
||||
MediaBackendError,
|
||||
|
@ -48,7 +49,7 @@ export class MediaController {
|
|||
@Post()
|
||||
@UseInterceptors(FileInterceptor('file'))
|
||||
async uploadMedia(
|
||||
@Req() req,
|
||||
@Req() req: Request,
|
||||
@UploadedFile() file: MulterFile,
|
||||
@Headers('HedgeDoc-Note') noteId: string,
|
||||
): Promise<MediaUploadUrlDto> {
|
||||
|
@ -80,7 +81,7 @@ export class MediaController {
|
|||
@UseGuards(TokenAuthGuard)
|
||||
@Delete(':filename')
|
||||
async deleteMedia(
|
||||
@Req() req,
|
||||
@Req() req: Request,
|
||||
@Param('filename') filename: string,
|
||||
): Promise<void> {
|
||||
const username = req.user.userName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue