Skip to content

Commit

Permalink
[fix]:Main Papago 번역 main에 적굥
Browse files Browse the repository at this point in the history
  • Loading branch information
qogustj committed May 23, 2024
1 parent 1fb46fa commit acae9d8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ public class SyncMainController {
private final GeoLocationService geoLocationService;
private final TranslateUtil translateUtil;
@GetMapping("/recommend")
public ResponseEntity<SuccessResponse<?>> recommendSync(@UserId Long userId, HttpServletRequest request) throws NoSuchAlgorithmException, InvalidKeyException, IOException {
public ResponseEntity<SuccessResponse<?>> recommendSync(@UserId Long userId,@RequestParam(name = "language", defaultValue = "한국어") String language, HttpServletRequest request) throws NoSuchAlgorithmException, InvalidKeyException, IOException {
String clientIp = ipService.getClientIpAddress(request);
// GeoLocation geoLocation = geoLocationService.getGeoLocation(clientIp);
List<SyncInfoResponseDto> syncInfoResponseDtos = syncManageService.recommendSync(userId, clientIp);
if (language.equals("영어"))syncInfoResponseDtos=syncInfoResponseDtos.stream().map(syncInfoResponseDto -> translateUtil.translateObject(syncInfoResponseDto)).toList();
return SuccessResponse.ok(syncInfoResponseDtos);
}
@PostMapping("/friend")
Expand Down

0 comments on commit acae9d8

Please sign in to comment.