Skip to content

Commit

Permalink
Merge pull request #17 from iHangbot/refactor/keyword
Browse files Browse the repository at this point in the history
refactor: 기존 배열로 받아오던 keyword를 배열이 아닌 형식으로 변경
  • Loading branch information
Jimin0304 authored Aug 5, 2023
2 parents 5454ebb + 073b880 commit c33d7c6
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,18 @@ public class KeyWordController {

@PostMapping("/getKeyWord")
@Operation(summary = "관심사 정보", description = "관심사 정보를 받아옵니다.")
public ResponseEntity<BasicResponse> getKeyWord(@RequestBody List<KeyWordRequestDTO> requestDTOList) throws ParseException {
for (KeyWordRequestDTO requestDTO : requestDTOList) {
String keyword = requestDTO.getKeyword();
String username = requestDTO.getUsername();
String count = requestDTO.getCount();
String date = requestDTO.getDate();
public ResponseEntity<BasicResponse> getKeyWord(@RequestBody KeyWordRequestDTO requestDTO) throws ParseException {
String keyword = requestDTO.getKeyword();
String username = requestDTO.getUsername();
String count = requestDTO.getCount();
String date = requestDTO.getDate();

SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");

Date localDate = formatter.parse(date);
Date localDate = formatter.parse(date);

keyWordService.addKeyWord(keyword, username, Integer.parseInt(count), localDate);

keyWordService.addKeyWord(keyword, username, Integer.parseInt(count), localDate);
}
return basicResponse.noContent();
}

Expand Down

0 comments on commit c33d7c6

Please sign in to comment.