Skip to content
Browse files

added handler for getting game info

  • Loading branch information...
1 parent e842f72 commit 8a60a78aead486d0cc93bd7baac04e384fd14d4c @polettix committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Narsil/WebService.pm
View
6 lib/Narsil/WebService.pm
@@ -864,6 +864,12 @@ get '/user/matches/:id' => sub {
};
};
+get '/game/:id' => sub {
+ my $id = param('id');
+ my $game = model()->get(game => $id);
+ return $game->plain();
+};
+
get '/games' => sub {
return [
map { scalar $_->plain() } model()->games()

0 comments on commit 8a60a78

Please sign in to comment.
Something went wrong with that request. Please try again.