Fixes #3514 - removed debugging code that was forcing 404

This commit is contained in:
snipe 2017-04-27 05:22:03 -07:00
parent 6fbf45554b
commit 68e831d555

View file

@ -489,40 +489,4 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
}); // Users group }); // Users group
### DEBUG ROUTES ###
Route::group(['prefix' => 'me'], function () {
if (env('APP_ENV') == 'production') {
abort(404);
}
Route::get('/profile', function () {
return json_encode([
'name' => \Auth::user()->first_name . ' ' . \Auth::user()->last_name,
'email' => \Auth::user()->email,
]);
});
Route::get('/authenticated', function () {
return json_encode([
'authenticated' => \Auth::check()
]);
});
Route::get('/permissions/{scope}/{action}', function ($scope, $action) {
return json_encode([
'permission' => $scope . '.' . $action,
'authorized' => \Auth::user()->hasAccess($scope . '.' . $action),
]);
});
Route::get('/permissions', function () {
return json_encode([
'permissions' => Auth::user()->permissions
]);
});
});
}); });