File tree Expand file tree Collapse file tree 3 files changed +25
-28
lines changed
Expand file tree Collapse file tree 3 files changed +25
-28
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,20 @@ sub startup ($self) {
8585 $auth -> post( ' /user/settings/email' )-> to( ' User#post_email' )-> name( ' do_user_email' );
8686
8787 # /blog/ routes
88- $r -> get ( ' /blog/:name' )-> to( ' Blog#get_blog' )-> name( ' blog' );
88+ $r -> get ( ' /blog/:name' )-> to( ' Blog#get_blog' )-> name( ' blog' ); # View A Specific Blog.
89+
90+ $auth -> get ( ' /blog/new' )-> to( ' Blog#get_new_blogs' )-> name( ' new_blogs' ); # List pending blogs for approval.
91+ $r -> post ( ' /blog/new' )-> to( ' Blog#post_new_blog' )-> name( ' do_new_blog' ); # Create a new blog.
92+ $r -> get ( ' /blog/new/:name' )-> to( ' Blog#get_edit_blog' )-> name( ' edit_new_blog' ); # Get the edit page for a new blog.
93+ $r -> post ( ' /blog/new/:name' )-> to( ' Blog#post_edit_blog' )-> name( ' do_edit_new_blog' ); # Post an update with the edit page.
94+
8995 $auth -> post( ' /blog/:name/follow' )-> to( ' Blog#post_follow' )-> name( ' do_follow_blog' );
9096 $auth -> post( ' /blog/:name/unfollow' )-> to( ' Blog#post_unfollow' )-> name( ' do_unfollow_blog' );
9197 $auth -> get ( ' /blog/:name/settings' )-> to( ' Blog#get_settings' )-> name( ' blog_settings' );
9298 $auth -> post( ' /blog/:name' )-> to( ' Blog#post_settings' )-> name( ' do_blog_settings' );
9399 $auth -> post( ' /blog/:name/publish' )-> to( ' Blog#post_publish' )-> name( ' do_publish' );
94100 $auth -> post( ' /blog/:name/unpublish' )-> to( ' Blog#post_unpublish' )-> name( ' do_unpublish' );
95101
96- # /new/
97- $r -> post ( ' /new' )-> to( ' Create#post_new' )-> name( ' do_add_new_blog' );
98- $r -> get ( ' /new/*name' )-> to( ' Create#get_new_blog' )-> name( ' update_new_blog' );
99- $r -> post ( ' /new/*name' )-> to( ' Create#post_new_blog' )-> name( ' do_update_new_blog' );
100-
101102 # /tags/
102103 $r -> get ( ' /tags' )-> to( ' Tags#get_tags' )-> name( ' tags' );
103104 $auth -> post( ' /tags/suggest' )-> to( ' Tags#post_suggest_tag' )-> name( ' do_suggest_tag' );
Original file line number Diff line number Diff line change @@ -36,4 +36,22 @@ sub post_unpublish ($c) {
3636
3737}
3838
39+ # Handle New Blogs
40+
41+ sub get_new_blogs ($c ) {
42+
43+ }
44+
45+ sub post_new_blog ($c ) {
46+
47+ }
48+
49+ sub get_edit_new_blog ($c ) {
50+
51+ }
52+
53+ sub post_edit_new_blog ($c ) {
54+
55+ }
56+
39571;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments