Add a route to manage rooms

master
Daniel Berteaud 11 years ago
parent b3e6f0ebdf
commit 9f9b4cc8b5
  1. 13
      public/vroom.pl

@ -723,6 +723,19 @@ get '/about' => sub {
get '/help' => 'help'; get '/help' => 'help';
# Route for the admin page # Route for the admin page
get '/admin/(:room)' => sub {
my $self = shift;
my $room = $self->stash('room');
my $data = $self->get_room($room);
unless ($data){
return $self->render('error',
err => 'ERROR_ROOM_s_DOESNT_EXIST',
msg => sprintf ($self->l("ERROR_ROOM_s_DOESNT_EXIST"), $room),
room => $room
);
}
$self->stash(room => $room);
} => 'manage_room';
get '/admin' => sub { get '/admin' => sub {
my $self = shift; my $self = shift;
$self->delete_rooms; $self->delete_rooms;

Loading…
Cancel
Save