From 74f59e5c81acb7651eb6b9392d7aafe1d3121906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=88=98=ED=98=84?= Date: Thu, 28 Nov 2024 01:05:40 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EC=8A=A4=ED=85=8C=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EA=B8=B0=EB=8A=A5=20=EC=BB=A8?= =?UTF-8?q?=ED=8A=B8=EB=A1=A4=EB=9F=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/StageController.java | 11 ---------- .../Controller/StageResetController.java | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 sever/src/main/java/com/example/rememberdokdo/Controller/StageResetController.java 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)); + } +}