1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-02 05:21:39 +02:00

Check if room exists in the goodbye route

This commit is contained in:
Daniel Berteaud 2014-05-14 17:46:18 +02:00
parent 072215a071
commit e4ce4b9678

View File

@ -306,6 +306,13 @@ get 'feedback_thanks' => 'feedback_thanks';
get '/goodby/(:room)' => sub {
my $self = shift;
my $room = $self->stash('room');
if (!$self->get_room($room)){
return $self->render('error',
err => 'ERROR_ROOM_s_DOESNT_EXIST',
msg => sprintf ($self->l("ERROR_ROOM_s_DOESNT_EXIST"), $room),
room => $room
);
}
$self->remove_participant($room,$self->session('name'));
$self->logout;
} => 'goodby';