Skip to content

Commit a654a8f

Browse files
committed
Updated tokens for the new API.
1 parent 8353064 commit a654a8f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

workers/common/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ module.exports = {
44
PREDICTIONS_NUM_YEARS: 20,
55
AGE_MAXIMUM: 100,
66
GOT_SHOW_BEGIN: 298, //first year the show took place
7-
GOT_API_BASE_URL: 'https://gotdata.northeurope.cloudapp.azure.com/api',
7+
GOT_API_BASE_URL: 'https://api.got.show/api',
88
};

workers/common/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class APIUpdater {
433433
longevity,
434434
longevityStart,
435435
plod,
436-
token: '123secure',
436+
token: 'GOT2019ACCESStoken',
437437
},
438438
});
439439
}
@@ -455,7 +455,7 @@ class APIUpdater {
455455
return request.post(config.GOT_API_BASE_URL + `/${dataset}/bayesean-attributes/update`, {
456456
json: {
457457
attributes: attrs,
458-
token: '123secure',
458+
token: 'GOT2019ACCESStoken',
459459
},
460460
});
461461
}

workers/uploader-predictions/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ const config = require('../common/config');
77

88
// update book predictions on server
99
for (let name in bookPred) {
10-
console.log(await updater.updatePLODLongevity('book', name, bookPred[name], config.GOT_CURRENT_YEAR_BOOK, 1 - bookPred[name][0]));
10+
try {
11+
console.log(await updater.updatePLODLongevity('book', name, bookPred[name], config.GOT_CURRENT_YEAR_BOOK, 1 - bookPred[name][0]));
12+
}
13+
catch(error) {} //TODO ?
1114
}
1215

1316
// update show predictions on server
1417
for (let name in showPred) {
15-
console.log(await updater.updatePLODLongevity('show', name, showPred[name], config.GOT_CURRENT_YEAR_SHOW, 1 - showPred[name][0]));
18+
try {
19+
console.log(await updater.updatePLODLongevity('show', name, showPred[name], config.GOT_CURRENT_YEAR_SHOW, 1 - showPred[name][0]));
20+
}
21+
catch(error) {} //TODO ?
1622
}
1723

1824
// output some final statistics

0 commit comments

Comments
 (0)