summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-09 13:35:54 -0700
committerZach Copley <zach@status.net>2009-10-09 13:35:54 -0700
commit09f4d1ef236c160afe6b9874793e43b501e1120a (patch)
tree08059f04610c1754addb611a6ce3e113c7c2d42d /lib/router.php
parentada84698f2e82c1c659d872dea0c4545ef93509a (diff)
New actions for blocks via API
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/router.php b/lib/router.php
index cf5c06b26..11f913f6e 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -474,10 +474,15 @@ class Router
// blocks
- $m->connect('api/blocks/:method/:argument',
- array('action' => 'api',
- 'apiaction' => 'blocks'));
+ $m->connect('api/blocks/create/:id.:format',
+ array('action' => 'ApiBlockCreate',
+ 'id' => '[a-zA-Z0-9]+',
+ 'format' => '(xml|json)'));
+ $m->connect('api/blocks/destroy/:id.:format',
+ array('action' => 'ApiBlockDestroy',
+ 'id' => '[a-zA-Z0-9]+',
+ 'format' => '(xml|json)'));
// help
$m->connect('api/help/test.:format',