source: bookmarks/trunk/BookmarkApp/Dispatch.pm @ 45

Last change on this file since 45 was 45, checked in by peter, 11 years ago
  • created a separate edit runmode to edit existing bookmarks; handled POST /{id}
  • the old edit runmode has been renamed to create, and only handles POST /
  • added an update method to the Bookmark class
  • the URI field on the bookmark editing form is no longer ever readonly; the URI can be changed after the bookmark has been created
  • changes to the URI or the bookmark's tags cause the bookmark's mtime to be updated
  • Property svn:executable set to *
File size: 714 bytes
RevLine 
[2]1#!/usr/bin/perl -w
2use strict;
3
[23]4package BookmarkApp::Dispatch;
5use base 'CGI::Application::Dispatch';
6
7sub dispatch_args {
8    return {
9        table => [
[30]10            '[get]'           => { app => 'BookmarkApp', rm => 'list' },
11            'list[get]'       => { app => 'BookmarkApp', rm => 'list' },
12            'feed[get]'       => { app => 'BookmarkApp', rm => 'feed' },
13            ':id[get]'        => { app => 'BookmarkApp', rm => 'view' },
14            ':id/:field[get]' => { app => 'BookmarkApp', rm => 'view_field' },
[45]15            '[post]'          => { app => 'BookmarkApp', rm => 'create' },
16            ':id[post]'       => { app => 'BookmarkApp', rm => 'edit' },
[23]17        ],
18    };
19}
20
[42]21# module return
221;
Note: See TracBrowser for help on using the repository browser.