mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
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:
parent
2b14ad92cd
commit
b78c94c3a1
3 changed files with 20 additions and 20 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue