summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-01 17:35:28 -0700
committerZach Copley <zach@status.net>2009-10-01 17:35:28 -0700
commit9a1dbee0fdd1f586512e4517a5abb7898501bc11 (patch)
treec8c1e4004452dd215e0f05c41a5e5a8a7e6d29e5 /lib
parentb3bbaecf47d74102a2ed48cd0c773d33a4a49d59 (diff)
A new action for /statuses/destroy
Diffstat (limited to 'lib')
-rw-r--r--lib/router.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/router.php b/lib/router.php
index 3de4e322f..5c9513f57 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -342,17 +342,22 @@ class Router
$m->connect('api/statuses/show/:id.:format',
array('action' => 'ApiShow',
- 'id' => '[a-zA-Z0-9]+',
+ 'id' => '[0-9]+',
'format' => '(xml|json)'));
$m->connect('api/statuses/update.:format',
array('action' => 'ApiUpdate',
'format' => '(xml|json)'));
- $m->connect('api/statuses/:method/:argument',
- array('action' => 'api',
- 'apiaction' => 'statuses'),
- array('method' => 'destroy'));
+ $m->connect('api/statuses/destroy.:format',
+ array('action' => 'ApiDestroy',
+ 'format' => '(xml|json)'));
+
+ $m->connect('api/statuses/destroy/:id.:format',
+ array('action' => 'ApiDestroy',
+ 'id' => '[0-9]+',
+ 'format' => '(xml|json)'));
+
// users