From dcd8e800b16c8ce59e791615670e64cb3d3a4e00 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 6 Apr 2017 21:18:35 -0700 Subject: [PATCH] Moved statuslabels API for route priority --- routes/api.php | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/routes/api.php b/routes/api.php index cb57572c9f..dae8225b6c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -366,23 +366,17 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () { /*--- Status Labels API ---*/ - Route::resource('statuslabels', 'StatuslabelsController', - [ - 'names' => - [ - 'index' => 'api.statuslabels.index', - 'store' => 'api.statuslabels.store', - 'show' => 'api.statuslabels.show', - 'update' => 'api.statuslabels.update', - 'destroy' => 'api.statuslabels.destroy' - ], - 'except' => ['create', 'edit'], - 'parameters' => ['statuslabel' => 'statuslabel_id'] - ] - ); Route::group(['prefix' => 'statuslabels'], function () { + // Pie chart for dashboard + Route::get('assets', + [ + 'as' => 'api.statuslabels.assets.bytype', + 'uses' => 'StatuslabelsController@getAssetCountByStatuslabel' + ] + ); + Route::get('{statuslabel}/assetlist', [ 'as' => 'api.statuslabels.assets', @@ -397,14 +391,25 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () { ] ); - // Pie chart for dashboard - Route::get('assets', - [ - 'as' => 'api.statuslabels.assets.bytype', - 'uses' => 'StatuslabelsController@getAssetCountByStatuslabel' - ] - ); - }); // Status labels group + + }); + + Route::resource('statuslabels', 'StatuslabelsController', + [ + 'names' => + [ + 'index' => 'api.statuslabels.index', + 'store' => 'api.statuslabels.store', + 'show' => 'api.statuslabels.show', + 'update' => 'api.statuslabels.update', + 'destroy' => 'api.statuslabels.destroy' + ], + 'except' => ['create', 'edit'], + 'parameters' => ['statuslabel' => 'statuslabel_id'] + ] + ); + + // Status labels group /*--- Suppliers API ---*/