From 1992343c2e1f2df892f39f971ae629edc59c33d0 Mon Sep 17 00:00:00 2001 From: Jozef Selesi Date: Tue, 18 Nov 2008 23:40:47 +0000 Subject: * Changed REST API. Now there are two separate methods for forms: GET /form/edit/{controller}/{resource_id} -> controller::_form_edit($resource) GET /form/add/{controller}/{parameters} -> controller::_form_add($parameters) * Updated comment, user and core modules to reflect the API changes * Cleaned up routing and handling of requests to /{controller} --- core/config/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/config') diff --git a/core/config/routes.php b/core/config/routes.php index ea177eda..120e6900 100644 --- a/core/config/routes.php +++ b/core/config/routes.php @@ -24,8 +24,8 @@ $config['^rest'] = null; $config['^rest/.*'] = null; $config['^(\w+)/(\d+)$'] = '$1/dispatch/$2'; -$config['^(\w+)$'] = '$1/index'; -$config['^form/(\w+)/(\w+)/(.*)$'] = '$2/form/$3/$1'; +$config['^(\w+)$'] = '$1/dispatch/0'; +$config['^form/(edit|add)/(\w+)/(.*)$'] = '$2/form_$1/$3'; // For now our default page is the scaffolding. $config['_default'] = 'welcome'; -- cgit v1.2.3