Skip to content

Commit

Permalink
fix: clear unless decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoGathK committed Oct 18, 2022
1 parent 7c24584 commit d8d5df1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/decorator.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import { Type, applyDecorators } from '@nestjs/common';
import { ApiBody, ApiConsumes, ApiOkResponse, getSchemaPath } from '@nestjs/swagger';
import { ApiOkResponse, getSchemaPath } from '@nestjs/swagger';

import { ExtraModelStore } from './struct';

export function SwaggerEntity(target: any) {
ExtraModelStore.set(target?.name, target);
}

export function ApiFormData(options: any) {
return applyDecorators(
ApiConsumes('multipart/form-data'),
ApiBody(options),
);
}

export function getResponseVo(ResponseBodyVo: Type) {
return function(Vo?: Type) {
return applyDecorators(
Expand Down

0 comments on commit d8d5df1

Please sign in to comment.