responseEntity 제거

This commit is contained in:
hyojun.choi 2024-08-19 14:30:02 +09:00
parent b5d7df98ed
commit fde0ec6441
3 changed files with 6 additions and 11 deletions

View File

@ -3,7 +3,6 @@ package com.interplug.qcast.biz.module;
import com.interplug.qcast.biz.module.dto.ModuleResponse;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@ -14,10 +13,9 @@ public class ModuleController {
// 모듈 조회
@GetMapping("/v1.0/modules/{roofMaterialId}/{trestleId}")
public ResponseEntity<List<ModuleResponse>> getModulesByRoofMaterialIdAndTrestleId(
public List<ModuleResponse> getModulesByRoofMaterialIdAndTrestleId(
@PathVariable("roofMaterialId") Integer roofMaterialId,
@PathVariable("trestleId") Integer trestleId) {
return ResponseEntity.ok(
moduleService.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId));
return moduleService.getModulesByRoofMaterialIdAndTrestleId(roofMaterialId, trestleId);
}
}

View File

@ -3,7 +3,6 @@ package com.interplug.qcast.biz.roofmaterial;
import com.interplug.qcast.biz.roofmaterial.dto.RoofMaterialResponse;
import java.util.List;
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;
@ -15,7 +14,7 @@ public class RoofMaterialController {
private final RoofMaterialService roofService;
@GetMapping("/v1.0/roof-materials")
public ResponseEntity<List<RoofMaterialResponse>> getRoofs() {
return ResponseEntity.ok(roofService.getRoofMaterials());
public List<RoofMaterialResponse> getRoofs() {
return roofService.getRoofMaterials();
}
}

View File

@ -3,7 +3,6 @@ package com.interplug.qcast.biz.trestle;
import com.interplug.qcast.biz.trestle.dto.TrestleResponse;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@ -13,8 +12,7 @@ public class TrestleController {
private final TrestleService trestleService;
@GetMapping("/v1.0/trestles/{roofMaterialId}")
public ResponseEntity<List<TrestleResponse>> getTrestlesByRoofMaterialId(
@PathVariable Integer roofMaterialId) {
return ResponseEntity.ok(trestleService.getTrestlesByRoofMaterialId(roofMaterialId));
public List<TrestleResponse> getTrestlesByRoofMaterialId(@PathVariable Integer roofMaterialId) {
return trestleService.getTrestlesByRoofMaterialId(roofMaterialId);
}
}