diff --git a/sever/src/main/java/com/example/rememberdokdo/Controller/StageController.java b/sever/src/main/java/com/example/rememberdokdo/Controller/StageController.java index 77ce259..618d172 100644 --- a/sever/src/main/java/com/example/rememberdokdo/Controller/StageController.java +++ b/sever/src/main/java/com/example/rememberdokdo/Controller/StageController.java @@ -16,8 +16,6 @@ public class StageController { @Autowired private StageService stageService; - @Autowired - private StageResetService stageResetService; // 특정 스테이지 접근 가능 여부 확인 @GetMapping("/{stageId}/access") @@ -55,15 +53,6 @@ public StageProgressResponseDto getStageStatus( @PathVariable int stageId, @RequestParam String sessionId ) { - return stageService.getStageStatus(sessionId, stageId); } - - // POST /stage/{stageId}/retry - @PostMapping("/{stageId}/reset") - public ResponseEntity resetStage( - @PathVariable int stageId, - @RequestParam String sessionId) { - return ResponseEntity.ok(stageResetService.resetStage(sessionId, stageId)); - } } \ No newline at end of file diff --git a/sever/src/main/java/com/example/rememberdokdo/Controller/StageResetController.java b/sever/src/main/java/com/example/rememberdokdo/Controller/StageResetController.java new file mode 100644 index 0000000..e50d3c0 --- /dev/null +++ b/sever/src/main/java/com/example/rememberdokdo/Controller/StageResetController.java @@ -0,0 +1,21 @@ +package com.example.rememberdokdo.Controller; + +import com.example.rememberdokdo.Dto.StageResetResponseDto; +import com.example.rememberdokdo.Service.StageResetService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("/stage") +public class StageResetController { + @Autowired + private StageResetService stageResetService; + + // POST /stage/reset + @PostMapping("/reset") + public ResponseEntity resetStage( + @RequestParam String sessionId) { + return ResponseEntity.ok(stageResetService.resetStage(sessionId)); + } +}