From 341a4f58e431c91b5a9c93e26c830ffd4f9d1af2 Mon Sep 17 00:00:00 2001 From: Conut-1 <1mim1@naver.com> Date: Fri, 27 Dec 2024 15:56:22 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20updateSpace=EC=97=90=20middleware=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nestjs-BE/server/src/spaces/spaces.controller.ts | 3 --- nestjs-BE/server/src/spaces/spaces.module.ts | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nestjs-BE/server/src/spaces/spaces.controller.ts b/nestjs-BE/server/src/spaces/spaces.controller.ts index 6b4eb290..0c4732a1 100644 --- a/nestjs-BE/server/src/spaces/spaces.controller.ts +++ b/nestjs-BE/server/src/spaces/spaces.controller.ts @@ -5,7 +5,6 @@ import { Body, Patch, Param, - UseInterceptors, UploadedFile, ValidationPipe, Header, @@ -13,7 +12,6 @@ import { Delete, UseGuards, } from '@nestjs/common'; -import { FileInterceptor } from '@nestjs/platform-express'; import { ApiTags, ApiResponse, ApiOperation, ApiQuery } from '@nestjs/swagger'; import { SpacesService } from './spaces.service'; import { CreateSpaceDto } from './dto/create-space.dto'; @@ -103,7 +101,6 @@ export class SpacesController { @Patch(':space_uuid') @UseGuards(MatchUserProfileGuard) @UseGuards(IsProfileInSpaceGuard) - @UseInterceptors(FileInterceptor('icon')) @ApiOperation({ summary: 'Update space by space_uuid' }) @ApiResponse({ status: HttpStatus.OK, diff --git a/nestjs-BE/server/src/spaces/spaces.module.ts b/nestjs-BE/server/src/spaces/spaces.module.ts index d874f671..63214130 100644 --- a/nestjs-BE/server/src/spaces/spaces.module.ts +++ b/nestjs-BE/server/src/spaces/spaces.module.ts @@ -21,6 +21,9 @@ export class SpacesModule implements NestModule { configure(consumer: MiddlewareConsumer) { consumer .apply(MulterFileMiddleware('icon')) - .forRoutes({ path: '/spaces', method: RequestMethod.POST }); + .forRoutes( + { path: '/spaces', method: RequestMethod.POST }, + { path: '/spaces/:space_uuid', method: RequestMethod.PATCH }, + ); } }