fix : 결과 전달시 두번 래핑되는 부분 수정

- 컨트롤러와 서비스에서 각각 래핑 후 결과 전달됨으로 이중 래핑되고 있음
  -> 서비스에서 래핑하는 부분을 컨트롤러로 옮겨서 컨트롤러에서만 한번 래핑하는 걸로 수정
This commit is contained in:
2025-08-19 12:41:17 +09:00
parent aa190bf48d
commit 43e4c507a7
18 changed files with 299 additions and 277 deletions

View File

@@ -13,34 +13,34 @@ class ModelService
public static function getModels()
{
$query = new Product();
return ApiResponse::response('get', $query);
return $query->get();
}
public static function setModel()
{
$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 getModel(int $id)
{
$query = Bom::find($id);
return ApiResponse::response('get', $query);
return $query->get();
}
public static function updateModel(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 destoryModel(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();
}
}