Skip to content

Commit

Permalink
Merge pull request #99 from EWHA-LUX/fix/#98
Browse files Browse the repository at this point in the history
[Fix] 단골 가게 조회 api post로 변경
  • Loading branch information
julia-heo authored May 25, 2024
2 parents 9b4f03e + 97d3abb commit bb51592
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 @@ -250,7 +250,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 @@ -293,7 +293,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

0 comments on commit bb51592

Please sign in to comment.