summaryrefslogtreecommitdiff
path: root/core/config/routes.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/config/routes.php')
-rw-r--r--core/config/routes.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/config/routes.php b/core/config/routes.php
index 5c34acb7..9b958df1 100644
--- a/core/config/routes.php
+++ b/core/config/routes.php
@@ -17,5 +17,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
+// REST configuration
+// Any resource requests (eg: album/1 or comment/3) get dispatched to the REST
+// dispatcher. Any direct calls to REST methods are also forced into the dispatcher
+// since the REST methods are internally expecting an ORM, not an id.
+$config['^rest'] = null;
+$config['^rest/.*'] = null;
$config['^(\w+)/(\d+)$'] = '$1/dispatch/$2';
+$config['^(\w+)/(?:get|post|put|delete)/(\d+)$'] = '$1/dispatch/$2';
+
+// For now our default page is the scaffolding.
$config['_default'] = 'welcome';