From 372e7add34341ec06d3d5962c2402293b2f1038e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 16 Oct 2014 21:33:34 +0200 Subject: [PATCH] Simplify remove_participant_from_room --- vroom.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vroom.pl b/vroom.pl index 98034bb..3a06cfb 100755 --- a/vroom.pl +++ b/vroom.pl @@ -324,14 +324,14 @@ helper remove_participant_from_room => sub { AND `participant`=?'); }; if ($@){ - return {msg => $@}; + return 0; } $sth->execute($room->{id},$participant); if ($sth->err){ - return {msg => "DB Error: " . $sth->errstr . " (code " . $sth->err . ")"}; + return 0; } $self->app->log->info($self->session('name') . " leaved the room $name"); - return {ok => 1}; + return 0; }; # Get a list of participants of a room