La Bureautique se meurt

This commit is contained in:
Boris 2022-10-31 21:40:42 +01:00
parent c7c6598a52
commit e7841d40de
2 changed files with 12 additions and 7 deletions

View File

@ -88,12 +88,12 @@ $games = [
$radiuses = [5, 10, 20, 50, 100];
define('DEFAULT_GAME', 'spationaute');
define('GAME_JS_DIR', 'themes/'. $_SESSION['gameId'] . '/js/map');
if (!isset($_SESSION['gameId'])) {
$_SESSION['gameId'] = DEFAULT_GAME;
}
define('GAME_JS_DIR', 'themes/'. $_SESSION['gameId'] . '/js/map');
define('DEFAULT_WEBPAGE_TITLE', 'La bureautique');

View File

@ -162,7 +162,7 @@ function storeAtFreds (json) {
const controller = new AbortController()
const timeoutId = setTimeout( () => {
controller.abort()
}, 2000)
}, 15000)
var fetchOpts = {
method: 'GET',
headers: {
@ -189,14 +189,19 @@ function storeAtFreds (json) {
const controller2 = new AbortController()
const timeoutId2 = setTimeout( () => {
controller.abort()
}, 2000)
}, 15000)
var fetchOpts2 = {
method: 'GET',
headers: {
// 'Accept': 'txt/html'
'Accept': 'text/html',
'Content-Type': 'text/html',
// 'Access-Control-Allow-Origin': '*',
'Origin': 'la-bureautique',
'Referrer-Policy': 'unsafe-url'
},
signal: controller2.signal,
redirect: 'follow'
mode: 'cors',
redirect: 'follow',
signal: controller2.signal
}
fetch(url, fetchOpts2)
.then(html => {
@ -246,7 +251,7 @@ fetchImmaterial(5)
console.error(error)
})
fetchShippable(25)
fetchShippable(5)
.then(records => {
displayShippable(records.hits.hits)