Skip to content

Commit

Permalink
fix: RequestMapping 추가, list()로 메서드명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
byeon22 committed Jan 23, 2024
1 parent 3beb679 commit 2aa7016
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,38 @@
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@Tag(name = "Wheel", description = "휠 모양 관련 API")
@RequestMapping("/wheels")
public class WheelController {
private final WheelService wheelService;

@GetMapping("/wheel")
@GetMapping
@Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"),
@ApiResponse(responseCode = "400(403)", description = "휠 모양 목록 조회 실패"),
})
public List<WheelListResponseDto> findAll() {
return wheelService.list();
public ResponseEntity<?> list() {
List<WheelListResponseDto> wheelList = wheelService.list();

return ResponseEntity.ok().body(wheelList);
}

/*
@GetMapping
@Operation(summary = "Wheel 목록 조회 메서드", description = "클라이언트가 요청한 휠 모양 목록 정보를 조회하기 위한 메서드")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "휠 모양 목록 조회 성공"),
@ApiResponse(responseCode = "400(403)", description = "휠 모양 목록 조회 실패"),
})
public ResponseEntity<Message> listWheel(HttpServletRequest request) {
WheelResponseDto wheelResponseDto = (WheelResponseDto) wheelService.list();
Expand Down

0 comments on commit 2aa7016

Please sign in to comment.