Permalink
Browse files

took all cases for not finding matches

  • Loading branch information...
1 parent ae163bc commit 8d91155041e62f562d9f4587cbc758084c4efbcb @polettix committed Oct 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Narsil/Frontend.pm
View
5 lib/Narsil/Frontend.pm
@@ -225,7 +225,8 @@ sub get_match {
my $item = rest_call(
get => "/match/$matchid",
{user => user()->{username}, features => \@features},
- );
+ ) or die "not found";
+ die $item->{error} if exists $item->{error};
die $item->{exception} if exists $item->{exception};
$match = $item;
warning Dumper($match);
@@ -267,7 +268,7 @@ get '/match/:id' => sub {
die {};
};
};
- return redirect request()->uri_for('/') unless defined $game;
+ return forward('/') unless defined $game;
my $gameid = $game->{id};
my $template = "games/$gameid";

0 comments on commit 8d91155

Please sign in to comment.