Skip to content

Commit

Permalink
Add controller skeletons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaitlyn Parkhurst committed Oct 9, 2021
1 parent e7737d7 commit a0af6e7
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Web/lib/BlogDB/Web/Controller/Blog.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package BlogDB::Web::Controller::Blog;
use Mojo::Base 'Mojolicious::Controller', -signatures;

sub get_blog ($c) {
$c->set_template( 'blog/index' );

}

sub post_follow ($c) {
$c->set_template( 'blog/index' );

}

sub post_unfollow ($c) {
$c->set_template( 'blog/index' );

}

sub get_settings ($c) {
$c->set_template( 'blog/settings' );

}

sub post_settings ($c) {
$c->set_template( 'blog/settings' );

}

sub post_publish ($c) {
$c->set_template( 'blog/settings' );

}

sub post_unpublish ($c) {
$c->set_template( 'blog/settings' );

}

1;
20 changes: 20 additions & 0 deletions Web/lib/BlogDB/Web/Controller/Create.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package BlogDB::Web::Controller::Create;
use Mojo::Base 'Mojolicious::Controller', -signatures;

sub post_new ($c) {

}

sub get_new_blog ($c) {
$c->set_template( 'new/index' );
}

sub post_new_blog ($c) {
$c->set_template( 'new/index' );
}

sub post_push_blog ($c) {

}

1;
42 changes: 42 additions & 0 deletions Web/lib/BlogDB/Web/Controller/Root.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package BlogDB::Web::Controller::Root;
use Mojo::Base 'Mojolicious::Controller', -signatures;

sub get_register ($c) {
$c->set_template( 'register' );

}

sub post_register ($c) {
$c->set_template( 'register' );

}

sub get_forgot ($c) {
$c->set_template( 'forgot' );

}

sub post_forgot ($c) {
$c->set_template( 'forgot' );

}

sub get_reset ($c) {
$c->set_template( 'reset' );

}

sub post_reset ($c) {
$c->set_template( 'reset' );

}

sub post_login ($c) {

}

sub post_logout ($c) {

}

1;
21 changes: 21 additions & 0 deletions Web/lib/BlogDB/Web/Controller/Tags.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package BlogDB::Web::Controller::Tags;
use Mojo::Base 'Mojolicious::Controller', -signatures;

sub get_tags ($c) {
$c->set_template( 'tags/index' );
}

sub post_suggest_tag ($c) {
$c->set_template( 'tags/index' );
}

sub post_vote_tag ($c) {
$c->set_template( 'tags/index' );
}

sub post_delete_tag ($c) {
$c->set_template( 'tags/index' );
}

1;

49 changes: 49 additions & 0 deletions Web/lib/BlogDB/Web/Controller/User.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package BlogDB::Web::Controller::User;
use Mojo::Base 'Mojolicious::Controller', -signatures;

# Do user listing for logged in or not logged in user.
# User to show is :name
sub get_user ($c) {
$c->set_template( 'user/index' );

}

# Do follow/unfollow for currently logged in user.
# User to follow is :name
sub post_follow ($c) {
$c->set_template( 'user/index' );

}

sub post_unfollow ($c) {
$c->set_template( 'user/index' );

}

# Set settings for currently logged in user.
sub get_settings ($c) {
$c->set_template( 'user/settings' );

}

sub post_bio ($c) {
$c->set_template( 'user/settings' );

}

sub post_about ($c) {
$c->set_template( 'user/settings' );

}

sub post_password ($c) {
$c->set_template( 'user/settings' );

}

sub post_email ($c) {
$c->set_template( 'user/settings' );

}

1;

0 comments on commit a0af6e7

Please sign in to comment.