-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrRowey
committed
Dec 23, 2021
1 parent
b7a85dc
commit b585800
Showing
10 changed files
with
12 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
public/armchart_4.1.12/armcharts4-geodata/continentsLow.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,11 @@ | ||
exports = module.exports = function(req, res) { | ||
|
||
let locals = res.locals; | ||
let fs = require('fs'); | ||
|
||
|
||
// locals.section is used to set the currently selected | ||
// item in the header navigation. | ||
locals.section = 'home'; | ||
|
||
fs.readFile('members/top5.json', 'utf8', function (err, data) { | ||
if (data) { | ||
locals.topPlayers = JSON.parse(data); | ||
} else { | ||
locals.topPlayers = {}; | ||
} | ||
|
||
let flash = {}; | ||
|
||
if (req.query.flash) { | ||
let buff = Buffer.from(req.query.flash, 'base64'); | ||
let text = buff.toString('ascii'); | ||
|
||
try { | ||
flash = JSON.parse(text); | ||
} catch(e) { | ||
console.error("Parsing error while trying to decode a flash error: " + text); | ||
console.error(e); | ||
flash = [{msg: "Unknown error"}]; | ||
} | ||
} | ||
|
||
// Render the view | ||
res.render('index', {flash: flash, refreshCountersSeconds: parseInt(process.env.PLAYER_COUNT_UPDATE_INTERVAL)}); | ||
}); | ||
res.render('index'); | ||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters