mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 11:37:02 -04:00
Add API decorator to reduce clutter
Signed-off-by: Thomas Snowden <zapperchamp1@gmail.com>
This commit is contained in:
parent
15e51f1244
commit
95df1525a9
3 changed files with 31 additions and 31 deletions
|
@ -39,7 +39,6 @@ import {
|
|||
ApiForbiddenResponse,
|
||||
ApiHeader,
|
||||
ApiNoContentResponse,
|
||||
ApiNotFoundResponse,
|
||||
ApiSecurity,
|
||||
ApiTags,
|
||||
ApiUnauthorizedResponse,
|
||||
|
@ -47,10 +46,10 @@ import {
|
|||
import { MediaUploadUrlDto } from '../../../media/media-upload-url.dto';
|
||||
import {
|
||||
forbiddenDescription,
|
||||
notFoundDescription,
|
||||
successfullyDeletedDescription,
|
||||
unauthorizedDescription,
|
||||
} from '../../utils/descriptions';
|
||||
import { FullApi } from '../../utils/fullapi-decorator';
|
||||
|
||||
@ApiTags('media')
|
||||
@ApiSecurity('token')
|
||||
|
@ -127,9 +126,7 @@ export class MediaController {
|
|||
@Delete(':filename')
|
||||
@HttpCode(204)
|
||||
@ApiNoContentResponse({ description: successfullyDeletedDescription })
|
||||
@ApiUnauthorizedResponse({ description: unauthorizedDescription })
|
||||
@ApiForbiddenResponse({ description: forbiddenDescription })
|
||||
@ApiNotFoundResponse({ description: notFoundDescription })
|
||||
@FullApi
|
||||
async deleteMedia(
|
||||
@Req() req: Request,
|
||||
@Param('filename') filename: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue