diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-10-02 23:25:23 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-10-02 23:25:23 +0200 |
| commit | e112e3a40594eb802ccb6549ad4329ae677f9e8d (patch) | |
| tree | a6cecdc9c196ff1ab09c6ae9baaf78728728f922 /appinfo | |
| parent | 600e904f35d598a64be0139d39b87a59ed5eaa12 (diff) | |
| download | grauphel-e112e3a40594eb802ccb6549ad4329ae677f9e8d.tar.gz grauphel-e112e3a40594eb802ccb6549ad4329ae677f9e8d.zip | |
add DELETE /token/$username/$tokenKey API
Diffstat (limited to 'appinfo')
| -rw-r--r-- | appinfo/application.php | 10 | ||||
| -rw-r--r-- | appinfo/routes.php | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/appinfo/application.php b/appinfo/application.php index cc39ceb..20325de 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -56,6 +56,16 @@ class Application extends App ); } ); + $container->registerService( + 'TokenController', + function($c) { + return new \OCA\Grauphel\Controller\TokenController( + $c->query('AppName'), + $c->query('Request'), + $c->query('Session')->getUser() + ); + } + ); } } ?> diff --git a/appinfo/routes.php b/appinfo/routes.php index a82db6b..a730583 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -73,6 +73,12 @@ $application->registerRoutes( 'name' => 'gui#tokens', 'verb' => 'GET', ), + + array( + 'url' => '/tokens/{username}/{tokenKey}', + 'name' => 'token#delete', + 'verb' => 'DELETE', + ), ) ) ); |
