From dcc651763b9d9664405a29404d9dec8c32ab53c9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 16 Oct 2014 21:31:57 +0200 Subject: [PATCH] Simplify modify_room helper --- vroom.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vroom.pl b/vroom.pl index 6cd334b..98034bb 100755 --- a/vroom.pl +++ b/vroom.pl @@ -265,7 +265,7 @@ helper modify_room => sub { WHERE `id`=?'); }; if ($@){ - return {msg => $@}; + return 0; } $sth->execute( $room->{owner}, @@ -277,10 +277,10 @@ helper modify_room => sub { $room->{id} ); if ($sth->err){ - return {msg => "DB Error: " . $sth->errstr . " (code " . $sth->err . ")"}; + return 0; } $self->app->log->info("Room " . $room->{name} ." modified by " . $self->session('name')); - return {ok => 1}; + return 1; }; # Add a participant in the database. Used by the signaling server to check