Skip to content

Commit

Permalink
refactor: Separate news item save logics (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Queue-ri committed Sep 20, 2023
1 parent 7789e99 commit 47e150d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public void fetch() {
NaverNewsResponseDto.class
).getBody();

saveItems(response);
}

public void saveItems(NaverNewsResponseDto response) {
List<NaverNewsItem> items = response.getItems();
List<NaverNewsItem> newItems = new ArrayList<>();
for (NaverNewsItem item : items) {
Expand Down

0 comments on commit 47e150d

Please sign in to comment.