adds cors to test in dev environment

This commit is contained in:
2019-07-03 14:32:35 +02:00
parent c95c13bf18
commit b8968aebbd
5 changed files with 19 additions and 5 deletions

View File

@@ -7,7 +7,9 @@ const PLAYER_LIST = [
];
const fetchPlayerList = function () {
fetch("http://localhost:8088/players")
.then(r => r.json())
.then(r => console.log(r));
};
const fetchRequests = function () {
@@ -25,6 +27,7 @@ export const AppStorage = {
// Initiate the state
initStorage (playerId) {
if (this.debug) console.log('Initiate with player : ', playerId)
fetchPlayerList();
this.state.player_id = playerId;
for (var idx in PLAYER_LIST) {
var player = PLAYER_LIST[idx];