feat: remove validation for upload image

This commit is contained in:
caturbgs 2021-12-21 13:35:04 +07:00
parent 1ea1e5cf46
commit ebcf216fa7
2 changed files with 10 additions and 9 deletions

View File

@ -11,7 +11,7 @@
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start", "start": "nest start",
"start:formatted": "nest start | pino-pretty", "start:formatted": "nest start | pino-pretty",
"start:dev": "nest start --watch", "start:dev": "nest start --watch | pino-pretty",
"start:debug": "nest start --debug --watch", "start:debug": "nest start --debug --watch",
"start:prod": "node dist/main", "start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",

View File

@ -1,23 +1,23 @@
import { import {
Body,
Controller, Controller,
Get, Get,
Post,
Body,
Put,
Param,
Delete,
ParseUUIDPipe,
HttpStatus, HttpStatus,
Param,
ParseUUIDPipe,
Post,
Put,
Query, Query,
UseInterceptors,
UploadedFile,
Res, Res,
UploadedFile,
UseInterceptors,
} from '@nestjs/common'; } from '@nestjs/common';
import { RoleService } from './roles.service'; import { RoleService } from './roles.service';
import { CommissionService } from './commission.service'; import { CommissionService } from './commission.service';
import { FileInterceptor } from '@nestjs/platform-express'; import { FileInterceptor } from '@nestjs/platform-express';
import { diskStorage } from 'multer'; import { diskStorage } from 'multer';
import { editFileName } from '../helper/file-handler'; import { editFileName } from '../helper/file-handler';
import { Public } from 'src/auth/public.decorator';
@Controller({ @Controller({
path: 'config', path: 'config',
@ -81,6 +81,7 @@ export class ConfigurableController {
}; };
} }
@Public()
@Post('/upload-files') @Post('/upload-files')
@UseInterceptors( @UseInterceptors(
FileInterceptor('file', { FileInterceptor('file', {