Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 단골 가게 조회 api post로 변경 #99

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public CommonResponse<?> announcedetail(@PathVariable Long announceId) {
}
}

// [Get] 사용자 근처 단골가게 조회
@GetMapping("/gps")
// [Post] 사용자 근처 단골가게 조회
@PostMapping("/gps")
@ResponseBody
public CommonResponse<?> nearFavorite(@AuthenticationPrincipal UserAccount user, @RequestBody SearchStoresRequestDto nearFavoriteRequestDto){
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public AnnounceDetailDto getAnnounceDetail(Long announceId) throws CustomExcepti
public List<SearchStoresResponseDto> searchStores(SearchStoresRequestDto dto, Users nowuser) throws CustomException {
// 단골가게 가져오기
List<Favorite> favorites = favoriteRepository.findAllByUsers(nowuser).get();
System.out.println(favorites);

if(favorites.isEmpty()){
throw new CustomException(ResponseCode.NO_FAVORITE_STORE);
}
Expand Down Expand Up @@ -296,7 +296,7 @@ public List<SearchStoresResponseDto> searchStores(SearchStoresRequestDto dto, Us
} catch (Exception e){
throw new CustomException(ResponseCode.GOOGLE_MAP_SEARCH_PLACE_FAIL);
}

System.out.println(responsebody);
if (responsebody.getPlaces() == null){
throw new CustomException(ResponseCode.NO_SEARCHED_FAVORITE_STORE);
}
Expand Down
Loading