diff --git a/backend/src/map/map.controller.ts b/backend/src/map/map.controller.ts index abb4ccdf..04d4864e 100644 --- a/backend/src/map/map.controller.ts +++ b/backend/src/map/map.controller.ts @@ -1,4 +1,13 @@ -import { Controller, Get, Post, Body, Query, Delete, Param, Patch } from '@nestjs/common'; +import { + Controller, + Get, + Post, + Body, + Query, + Delete, + Param, + Patch, +} from '@nestjs/common'; import { MapService } from './map.service'; import { CreateMapRequest } from './dto/CreateMapRequest'; import { UpdateMapInfoRequest } from './dto/UpdateMapInfoRequest'; @@ -35,13 +44,19 @@ export class MapController { } @Patch('/:id/info') - async updateMapInfo(@Param('id') id: number, @Body() updateMapForm: UpdateMapInfoRequest) { + async updateMapInfo( + @Param('id') id: number, + @Body() updateMapForm: UpdateMapInfoRequest, + ) { await this.appService.updateMapInfo(id, updateMapForm); return { id, ...updateMapForm }; } @Patch('/:id/visibility') - async updateMapVisibility(@Param('id') id: number, @Body('isPublic') isPublic: boolean) { + async updateMapVisibility( + @Param('id') id: number, + @Body('isPublic') isPublic: boolean, + ) { await this.appService.updateMapVisibility(id, isPublic); return { id, isPublic }; } diff --git a/backend/src/map/map.service.ts b/backend/src/map/map.service.ts index d7bb32fd..335afe45 100644 --- a/backend/src/map/map.service.ts +++ b/backend/src/map/map.service.ts @@ -46,7 +46,11 @@ export class MapService { where: { user: { id: userId } }, }); - const ownMaps = await this.mapRepository.findByUserId(userId, page, pageSize); + const ownMaps = await this.mapRepository.findByUserId( + userId, + page, + pageSize, + ); return { maps: await Promise.all(ownMaps.map(MapListResponse.from)), @@ -90,6 +94,7 @@ export class MapService { } private async checkExists(id: number) { - if (!(await this.mapRepository.existById(id))) throw new MapNotFoundException(id); + if (!(await this.mapRepository.existById(id))) + throw new MapNotFoundException(id); } }