From 4e4681cae690f8b73d2d382faab3e2bea3f713d6 Mon Sep 17 00:00:00 2001 From: BaeJunho Date: Fri, 15 Nov 2024 02:00:48 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=AA=85=EC=84=B8=EC=99=80=20=EB=A7=9E?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 토큰 검증이 필요한 부분에 토큰 검증 추가 --- .../java/team7/inplace/video/application/VideoService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/team7/inplace/video/application/VideoService.java b/src/main/java/team7/inplace/video/application/VideoService.java index 7f2a7d48..b8de2858 100644 --- a/src/main/java/team7/inplace/video/application/VideoService.java +++ b/src/main/java/team7/inplace/video/application/VideoService.java @@ -7,12 +7,14 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import team7.inplace.global.exception.InplaceException; +import team7.inplace.global.exception.code.AuthorizationErrorCode; import team7.inplace.global.exception.code.PlaceErrorCode; import team7.inplace.global.exception.code.VideoErrorCode; import team7.inplace.influencer.persistence.InfluencerRepository; import team7.inplace.place.application.dto.PlaceForVideo; import team7.inplace.place.domain.Place; import team7.inplace.place.persistence.PlaceRepository; +import team7.inplace.security.util.AuthorizationUtil; import team7.inplace.video.application.command.VideoCommand; import team7.inplace.video.application.command.VideoCommand.Create; import team7.inplace.video.application.dto.VideoInfo; @@ -35,6 +37,10 @@ public class VideoService { @Transactional(readOnly = true) public List getVideosBySurround(VideoSearchParams videoSearchParams) { + // 토큰 정보에 대한 검증 + if (AuthorizationUtil.isNotLoginUser()) { + throw InplaceException.of(AuthorizationErrorCode.TOKEN_IS_EMPTY); + } // Place 엔티티 조회 Page places = placeRepository.findPlacesByDistanceAndFilters( videoSearchParams.topLeftLongitude(),