Skip to content

Commit 990b314

Browse files
authored
Merge 66a9059 into 74386de
2 parents 74386de + 66a9059 commit 990b314

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/main/java/sevenstar/marineleisure/favorite/service/FavoriteServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import sevenstar.marineleisure.favorite.repository.FavoriteRepository;
1717
import sevenstar.marineleisure.global.exception.CustomException;
1818
import sevenstar.marineleisure.global.exception.enums.FavoriteErrorCode;
19+
import sevenstar.marineleisure.global.exception.enums.SpotErrorCode;
1920
import sevenstar.marineleisure.spot.domain.OutdoorSpot;
2021
import sevenstar.marineleisure.spot.repository.OutdoorSpotRepository;
2122

@@ -45,9 +46,8 @@ public FavoriteSpot searchFavoriteById(Long id) {
4546
@Transactional
4647
public Long createFavorite(Long id) {
4748
Long currentMemberId = getCurrentUserId();
48-
// 우선 즐겨찾기를 못찾았다고 넣었지만, 나중에 Spot에러코드 추가되면 그걸로 교체 예정입니다.
4949
OutdoorSpot outdoorSpot = spotRepository.findById(id)
50-
.orElseThrow(() -> new CustomException(FavoriteErrorCode.FAVORITE_NOT_FOUND));
50+
.orElseThrow(() -> new CustomException(SpotErrorCode.SPOT_NOT_FOUND));
5151

5252
FavoriteSpot createdFavoriteSpot = FavoriteSpot.builder()
5353
.memberId(currentMemberId)

src/main/java/sevenstar/marineleisure/global/config/SecurityConfig.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ public CorsConfigurationSource corsConfigurationSource() {
7676

7777
// 와일드카드 대신 명시적인 오리진 목록 사용
7878
config.setAllowedOrigins(Arrays.asList(
79-
"https://your-frontend-domain.com", // 프로덕션 환경 프론트엔드 도메인
79+
"https://marineleisure.vercel.app", // 프로덕션 환경 프론트엔드 도메인
8080
"http://localhost:3000", // 개발 환경 프론트엔드 도메인
81-
"http://localhost:5173" // 현재 프론트엔드 개발 환경
81+
"http://localhost:5173",
82+
"http://localhost:7030" // 현재 프론트엔드 개발 환경
8283
));
8384

84-
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
85+
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
8586
config.setAllowedHeaders(Arrays.asList("Authorization", "Content-Type", "X-Requested-With"));
8687

8788
// jwt.use-cookie 설정에 따라 credentials 설정 변경

src/main/resources/application-prod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ kakao:
5454
login:
5555
api_key: ${KAKAO_API_KEY}
5656
client_secret: ${KAKAO_CLIENT_SECRET}
57-
redirect_uri: http://localhost:5173/oauth/kakao/callback
57+
redirect_uri: ${KAKAO_REDIRECT_URI}
58+
5859
uri:
5960
code: /oauth/authorize
6061
base: https://kauth.kakao.com

0 commit comments

Comments
 (0)