|
|
@ -316,7 +316,6 @@ post '/create' => sub { |
|
|
|
$self->res->headers->cache_control('max-age=1, no-cache'); |
|
|
|
$self->res->headers->cache_control('max-age=1, no-cache'); |
|
|
|
my $name = $self->param('roomName') || $self->get_random_name(); |
|
|
|
my $name = $self->param('roomName') || $self->get_random_name(); |
|
|
|
$self->login; |
|
|
|
$self->login; |
|
|
|
$self->session($name => {role => 'owner'}); |
|
|
|
|
|
|
|
unless ($self->valid_room_name($name)){ |
|
|
|
unless ($self->valid_room_name($name)){ |
|
|
|
return $self->render('error', |
|
|
|
return $self->render('error', |
|
|
|
room => $name, |
|
|
|
room => $name, |
|
|
@ -333,6 +332,7 @@ post '/create' => sub { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
|
|
|
|
$self->session($name => {role => 'owner'}); |
|
|
|
$self->redirect_to($self->url_for('/') . $name); |
|
|
|
$self->redirect_to($self->url_for('/') . $name); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|