Skip to content

Commit

Permalink
fix: /update requestBody 배열 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
KangmoonSeo committed Nov 17, 2023
1 parent 2c9271e commit 7b9d4de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import lombok.RequiredArgsConstructor;
import org.hellokicktty.server.domain.Kickboard;
import org.hellokicktty.server.dto.UpdateRequestDto;
import org.hellokicktty.server.service.KickboardService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -20,12 +19,10 @@ public class UpdateController {
private final KickboardService kickboardService;

@PostMapping("/update")
public void updateKickboards(@RequestBody UpdateRequestDto dto) {

List<Kickboard> kickboardList = dto.getKickboards();
public void updateKickboards(@RequestBody List<Kickboard> kickboardList) {
for (Kickboard k : kickboardList) {
kickboardService.updateKickboard(k);
}
log.info("{} kickboards are updated on repository", dto.getKickboards().size());
log.info("{} kickboards are updated on repository", kickboardList.size());
}
}

This file was deleted.

0 comments on commit 7b9d4de

Please sign in to comment.