Add API decorator to reduce clutter

Signed-off-by: Thomas Snowden <zapperchamp1@gmail.com>
This commit is contained in:
Thomas Snowden 2021-04-24 19:10:16 -04:00 committed by David Mehren
parent 15e51f1244
commit 95df1525a9
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 31 additions and 31 deletions

View file

@ -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,