fix : 결과 전달시 두번 래핑되는 부분 수정
- 컨트롤러와 서비스에서 각각 래핑 후 결과 전달됨으로 이중 래핑되고 있음 -> 서비스에서 래핑하는 부분을 컨트롤러로 옮겨서 컨트롤러에서만 한번 래핑하는 걸로 수정
This commit is contained in:
@@ -19,7 +19,7 @@ public static function getCategory($request)
|
||||
// 재귀적으로 트리 구성
|
||||
$list = self::fetchCategoryTree($parentId, $group);
|
||||
|
||||
return ApiResponse::response('result', $list);
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ protected static function fetchCategoryTree($parentId = null, $group = 'category
|
||||
public static function getCategoryFlat($group = 'category')
|
||||
{
|
||||
$query = CommonCode::where('code_group',$group)->whereNull('parent_id');
|
||||
return ApiResponse::response('get', $query);
|
||||
return $query->get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user