Skip to content

Commit

Permalink
Activated new-year timer (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Th3Shadowbroker committed Oct 9, 2019
1 parent 523613a commit 59bc3d5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
7 changes: 7 additions & 0 deletions public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@
"description": "Enables/disables the interest-timer.",
"type": "boolean"
},
{
"name": "newYear",
"in": "query",
"required": false,
"description": "Enables/disables the new-year-timer.",
"type": "boolean"
},
{
"name": "leadingZeros",
"in": "query",
Expand Down
8 changes: 8 additions & 0 deletions svc/routing/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ async function handleSummary(req, res) {
let magmaBoss = req.query.hasOwnProperty('magmaBoss') ? req.query.magmaBoss === 'true' : true;
let darkAuction = req.query.hasOwnProperty('darkAuction') ? req.query.darkAuction === 'true' : true;
let interest = req.query.hasOwnProperty('interest') ? req.query.interest === 'true' : true;
let newYear = req.query.hasOwnProperty('newYear') ? req.query.newYear === 'true' : true;
let summary = [];

// Magma-Boss timer requested
Expand All @@ -112,6 +113,13 @@ async function handleSummary(req, res) {
} );
}

// New-year timer requested
if (newYear) {
await Timer.newYear().then( result => {
summary.push( stringifyResults(req, result, 'newYear').frames[0] );
} );
}

return {frames: summary};
}

Expand Down

0 comments on commit 59bc3d5

Please sign in to comment.