diff --git a/workspace/server/src/main/java/org/hellokicktty/server/controller/UpdateController.java b/workspace/server/src/main/java/org/hellokicktty/server/controller/UpdateController.java index ad83b65..70c893c 100644 --- a/workspace/server/src/main/java/org/hellokicktty/server/controller/UpdateController.java +++ b/workspace/server/src/main/java/org/hellokicktty/server/controller/UpdateController.java @@ -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; @@ -20,12 +19,10 @@ public class UpdateController { private final KickboardService kickboardService; @PostMapping("/update") - public void updateKickboards(@RequestBody UpdateRequestDto dto) { - - List kickboardList = dto.getKickboards(); + public void updateKickboards(@RequestBody List 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()); } } diff --git a/workspace/server/src/main/java/org/hellokicktty/server/dto/UpdateRequestDto.java b/workspace/server/src/main/java/org/hellokicktty/server/dto/UpdateRequestDto.java deleted file mode 100644 index 5a780d5..0000000 --- a/workspace/server/src/main/java/org/hellokicktty/server/dto/UpdateRequestDto.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.hellokicktty.server.dto; - -import lombok.Getter; -import lombok.NoArgsConstructor; -import org.hellokicktty.server.domain.Kickboard; - -import java.util.ArrayList; -import java.util.List; - -@Getter -@NoArgsConstructor -public class UpdateRequestDto { - List kickboards = new ArrayList<>(); - -}