Skip to content

Commit

Permalink
Merge pull request #36 from endless-horses/fix#35-api-address
Browse files Browse the repository at this point in the history
 *Controller api 주소 수정 close #35
  • Loading branch information
SubiHwang authored Jan 26, 2024
2 parents d8a2db2 + d441157 commit bdf59bb
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import com.endlesshorses.oot.custom.accessory.dto.AccessoryListResponseDto;
import com.endlesshorses.oot.custom.accessory.service.AccessoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
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.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -18,18 +17,18 @@
@RestController
@RequiredArgsConstructor
@Tag(name = "Accessory", description = "액세서리 관련 API")
@RequestMapping("/accessories")
@RequestMapping("/api/accessories")
public class AccessoryController {
private final AccessoryService accessoryService;
private final AccessoryService accessoryService;

@GetMapping
@Operation(summary = "Accessory 목록 조회 메서드", description = "클라이언트가 요청한 액세서리 목록 정보를 조회하기 위한 메서드")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "액세서리 목록 조회 성공")
})
public ResponseEntity<List<AccessoryListResponseDto>> list() {
List<AccessoryListResponseDto> accessoryList = accessoryService.list();
@GetMapping
@Operation(summary = "Accessory 목록 조회 메서드", description = "클라이언트가 요청한 액세서리 목록 정보를 조회하기 위한 메서드")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "액세서리 목록 조회 성공")
})
public ResponseEntity<List<AccessoryListResponseDto>> list() {
List<AccessoryListResponseDto> accessoryList = accessoryService.list();

return ResponseEntity.ok().body(accessoryList);
}
return ResponseEntity.ok().body(accessoryList);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@RestController
@RequiredArgsConstructor
@Tag(name = "Color", description = "색상 관련 API")
@RequestMapping("/colors")
@RequestMapping("/api/colors")
public class ColorController {
private final ColorService colorService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@RestController
@RequiredArgsConstructor
@Tag(name = "Font", description = "폰트 관련 API")
@RequestMapping("/fonts")
@RequestMapping("/api/fonts")
public class FontController {
private final FontService fontService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@RestController
@RequiredArgsConstructor
@Tag(name = "Pattern", description = "패턴 관련 API")
@RequestMapping("/patterns")
@RequestMapping("/api/patterns")
public class PatternController {
private final PatternService patternService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
@RestController
@RequiredArgsConstructor
@Tag(name = "Wheel", description = "휠 모양 관련 API")
@RequestMapping("/wheels")
@RequestMapping("/api/wheels")
public class WheelController {
private final WheelService wheelService;

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

return ResponseEntity.ok().body(wheelList);
}
private final WheelService wheelService;

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

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

/*
@GetMapping
Expand Down

0 comments on commit bdf59bb

Please sign in to comment.