Skip to content

Commit

Permalink
[fix] 명세와 맞지 않는 부분 수정
Browse files Browse the repository at this point in the history
토큰 검증이 필요한 부분에 토큰 검증 추가
  • Loading branch information
BaeJunho committed Nov 14, 2024
1 parent 580c893 commit 4e4681c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,6 +37,10 @@ public class VideoService {

@Transactional(readOnly = true)
public List<VideoInfo> getVideosBySurround(VideoSearchParams videoSearchParams) {
// 토큰 정보에 대한 검증
if (AuthorizationUtil.isNotLoginUser()) {
throw InplaceException.of(AuthorizationErrorCode.TOKEN_IS_EMPTY);
}
// Place 엔티티 조회
Page<Place> places = placeRepository.findPlacesByDistanceAndFilters(
videoSearchParams.topLeftLongitude(),
Expand Down

0 comments on commit 4e4681c

Please sign in to comment.