From b6fa3a2a89b72685b445060aca4614f16862983c Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 7 Apr 2016 17:23:52 -0700 Subject: [PATCH] Added todos, fixed ID casing --- app/Http/Controllers/CategoriesController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CategoriesController.php b/app/Http/Controllers/CategoriesController.php index f8790af34a..bce37d62cc 100755 --- a/app/Http/Controllers/CategoriesController.php +++ b/app/Http/Controllers/CategoriesController.php @@ -235,6 +235,7 @@ class CategoriesController extends Controller * Returns a JSON response with the data to populate the bootstrap table on the * cateory listing page. * + * @todo Refactor this nastiness. Assets do not behave the same as accessories, etc. * @author [A. Gianotto] [] * @see CategoriesController::getIndex() method that generates the view * @since [v1.8] @@ -302,16 +303,19 @@ class CategoriesController extends Controller /** * Returns JSON response that contains the data for the category detail page. * + * @todo Refactor this nastiness. Assets do not behave + * the same as accessories, etc. Need to figure out if I should + * make separate controllers, or what. Too much copypasta if I try to work it in here. * @author [A. Gianotto] [] * @see CategoriesController::getView() method that generates the view * @param int $categoryId * @since [v1.8] * @return String JSON */ - public function getDataView($categoryID) + public function getDataView($categoryId) { - $category = Category::find($categoryID); + $category = Category::find($categoryId); if ($category->category_type =='asset') { $category_assets = $category->assets;