Permalink
Browse files

all menu actions are under the Menu controller (as they always should…

… have been)
  • Loading branch information...
1 parent a3d1ecb commit 4bdc3daf3e7e7e3f52845345fefdea752c0c4870 @jberger committed Feb 22, 2013
View
@@ -179,10 +179,10 @@ sub startup {
return 1;
});
- $if_author->any( '/admin/menu' )->to('edit#edit_menu');
+ $if_author->any( '/admin/menu' )->to('menu#edit');
$if_author->any( '/edit/:name' )->to('page#edit');
$if_author->websocket( '/store/page' )->to('page#store');
- $if_author->websocket( '/store/menu' )->to('edit#store_menu');
+ $if_author->websocket( '/store/menu' )->to('menu#store');
my $if_admin = $r->under( sub {
my $self = shift;
@@ -1,9 +1,9 @@
-package Galileo::Edit;
+package Galileo::Menu;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::JSON 'j';
-sub edit_menu {
+sub edit {
my $self = shift;
my $name = 'main';
my $schema = $self->schema;
@@ -33,7 +33,7 @@ sub edit_menu {
);
}
-sub store_menu {
+sub store {
my $self = shift;
$self->on( text => sub {
my ($self, $message) = @_;

0 comments on commit 4bdc3da

Please sign in to comment.