Skip to content

Commit

Permalink
refactor: 타이머 컨트롤러 메서드명 및 타이머 일시정지 엔드포인트(stop -> pause) 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHyeonL committed Feb 14, 2025
1 parent b9ab110 commit 91268d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public class TimerController implements TimerDocs {
private final SchedulerService schedulerService;

@PatchMapping("/{accessCode}/timer/start")
public ResponseEntity<Void> createTimerStart(@PathVariable("accessCode") final String accessCode) {
public ResponseEntity<Void> startTimer(@PathVariable("accessCode") final String accessCode) {
schedulerService.start(accessCode);
return ResponseEntity.noContent()
.build();
}

@PatchMapping("/{accessCode}/timer/stop")
public ResponseEntity<Void> createTimerStop(@PathVariable("accessCode") final String accessCode) {
@PatchMapping("/{accessCode}/timer/pause")
public ResponseEntity<Void> pauseTimer(@PathVariable("accessCode") final String accessCode) {
schedulerService.pause(accessCode);
return ResponseEntity.noContent()
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public interface TimerDocs {
@Operation(summary = "타이머를 시작한다.")
@ApiResponse(responseCode = "204", description = "타이머 시작 성공")
@ApiResponse(responseCode = "4xx", description = "페어룸 시작 실패", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ApiErrorResponse.class)))
ResponseEntity<Void> createTimerStart(String accessCode);
ResponseEntity<Void> startTimer(String accessCode);

@Operation(summary = "타이머를 중지한다.")
@ApiResponse(responseCode = "204", description = "타이머 즁자 성공")
@ApiResponse(responseCode = "4xx", description = "페어룸 중지 실패", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = ApiErrorResponse.class)))
ResponseEntity<Void> createTimerStop(String accessCode);
ResponseEntity<Void> pauseTimer(String accessCode);

@Operation(summary = "타이머를 업데이트한다.")
@ApiResponse(responseCode = "204", description = "타이머 업데이트 성공", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE))
Expand Down

0 comments on commit 91268d9

Please sign in to comment.