' . $secret . '
')->flash();
- Alert::info("")->flash();
- return redirect()->route('admin.api');
- } catch (DisplayValidationException $ex) {
- return redirect()->route('admin.api.new')->withErrors(json_decode($ex->getMessage()))->withInput();
- } catch (DisplayException $ex) {
- Alert::danger($ex->getMessage())->flash();
- } catch (\Exception $ex) {
- Log::error($ex);
- Alert::danger('An unhandled exception occured while attempting to add this API key.')->flash();
- }
- return redirect()->route('admin.api.new')->withInput();
- }
-
- public function deleteRevokeKey(Request $request, $key)
- {
- try {
- $api = new APIRepository;
- $api->revoke($key);
- return response('', 204);
- } catch (\Exception $ex) {
- return response()->json([
- 'error' => 'An error occured while attempting to remove this key.'
- ], 503);
- }
- }
-
-}
diff --git a/app/Http/Routes/AdminRoutes.php b/app/Http/Routes/AdminRoutes.php
index a1d1956e0..3f6e73bcb 100644
--- a/app/Http/Routes/AdminRoutes.php
+++ b/app/Http/Routes/AdminRoutes.php
@@ -303,32 +303,6 @@ class AdminRoutes {
]);
});
- // API Routes
- $router->group([
- 'prefix' => 'admin/api',
- 'middleware' => [
- 'auth',
- 'admin',
- 'csrf'
- ]
- ], function () use ($router) {
- $router->get('/', [
- 'as' => 'admin.api',
- 'uses' => 'Admin\APIController@getIndex'
- ]);
- $router->get('/new', [
- 'as' => 'admin.api.new',
- 'uses' => 'Admin\APIController@getNew'
- ]);
- $router->post('/new', [
- 'uses' => 'Admin\APIController@postNew'
- ]);
- $router->delete('/revoke/{key?}', [
- 'as' => 'admin.api.revoke',
- 'uses' => 'Admin\APIController@deleteRevokeKey'
- ]);
- });
-
// Database Routes
$router->group([
'prefix' => 'admin/databases',
diff --git a/resources/views/admin/api/index.blade.php b/resources/views/admin/api/index.blade.php
deleted file mode 100644
index 205b6e88f..000000000
--- a/resources/views/admin/api/index.blade.php
+++ /dev/null
@@ -1,113 +0,0 @@
-{{-- Copyright (c) 2015 - 2016 Dane Everitt