Skip to content

Commit

Permalink
feat: updateSpace에 middleware 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
Conut-1 committed Dec 27, 2024
1 parent 4a9bd54 commit 341a4f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions nestjs-BE/server/src/spaces/spaces.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import {
Body,
Patch,
Param,
UseInterceptors,
UploadedFile,
ValidationPipe,
Header,
HttpStatus,
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';
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion nestjs-BE/server/src/spaces/spaces.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
);
}
}

0 comments on commit 341a4f5

Please sign in to comment.