Skip to content

Commit 88addd0

Browse files
committed
Makes the trailing slash optional
1 parent 3154984 commit 88addd0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
send_file File.join(settings.public_folder, "index.html")
3535
end
3636

37-
post "/games" do
37+
post "/games/?" do
3838
data = parse_body
3939

4040
# Remove all the old games.
@@ -46,15 +46,15 @@
4646
json(game)
4747
end
4848

49-
get "/games/{id}" do
49+
get "/games/{id}/?" do
5050
data = parse_body
5151

5252
game = Game.find(data["id"])
5353

5454
json(game)
5555
end
5656

57-
post "/games/{id}/flag" do
57+
post "/games/{id}/flag/?" do
5858
data = parse_body
5959

6060
game = Game.find(data["id"])
@@ -66,7 +66,7 @@
6666
json(game)
6767
end
6868

69-
post "/games/{id}/check" do
69+
post "/games/{id}/check/?" do
7070
data = parse_body
7171

7272
game = Game.find(data["id"])

0 commit comments

Comments
 (0)