fix : 결과 전달시 두번 래핑되는 부분 수정
- 컨트롤러와 서비스에서 각각 래핑 후 결과 전달됨으로 이중 래핑되고 있음 -> 서비스에서 래핑하는 부분을 컨트롤러로 옮겨서 컨트롤러에서만 한번 래핑하는 걸로 수정
This commit is contained in:
@@ -12,34 +12,34 @@ class BomService
|
||||
public static function getBoms()
|
||||
{
|
||||
$query = new Bom();
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
public static function setBom()
|
||||
{
|
||||
$query = DB::table('COM_CODE')
|
||||
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
public static function getBom(int $id)
|
||||
{
|
||||
$query = Bom::find($id);
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
public static function updateBom(int $id)
|
||||
{
|
||||
$query = DB::table('COM_CODE')
|
||||
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
public static function destoryBom(int $id)
|
||||
{
|
||||
$query = DB::table('COM_CODE')
|
||||
->select(['CODE_TP_ID', 'CODE_ID', 'CODE_VAL', 'CODE_DESC', 'USE_YN']);
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user