Skip to content

Commit

Permalink
refactor: ResponseStatus + DTO 방식으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
kmebin committed Nov 1, 2023
1 parent 416adac commit ebb1e1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/com/moabam/api/presentation/BugController.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.moabam.api.presentation;

import org.springframework.http.ResponseEntity;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import com.moabam.api.application.BugService;
Expand All @@ -18,7 +19,8 @@ public class BugController {
private final BugService bugService;

@GetMapping
public ResponseEntity<BugResponse> getBug() {
return ResponseEntity.ok(bugService.getBug(1L));
@ResponseStatus(HttpStatus.OK)
public BugResponse getBug() {
return bugService.getBug(1L);
}
}

0 comments on commit ebb1e1e

Please sign in to comment.