]> git.cworth.org Git - lmno.games/commit - empires/game.js
empires: Construct reliable paths for all game API endpoints
authorCarl Worth <cworth@cworth.org>
Sun, 24 May 2020 15:06:11 +0000 (08:06 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 24 May 2020 15:20:47 +0000 (08:20 -0700)
commit53c003049ece892e3f648675b897b6cea8f4dc8b
treef921c081240bb257c794920580ce3edb600ab03f
parent20c213c065cd264b12f2b7e042e0b2fe7443b656
empires: Construct reliable paths for all game API endpoints

By appending to window.location we can ensure that we're always
hitting an endpoint one level below the game ID, (and not replacing
the game ID), regardless of whether the current path ends in a
trailing slash or not.
empires/game.js