diff options
author | gumi <git@gumi.ca> | 2018-04-11 12:41:03 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-04-11 12:41:03 -0400 |
commit | ac5a25d7aea0626aa0f42d6bc31399aee6e7e90f (patch) | |
tree | a891d1713a0608ca981fb59eaac657c4dacf0c50 /src/routers/tmwa/index.js | |
parent | 5422995ae12a085e5b934a56f25c68b0752bb878 (diff) | |
download | api-ac5a25d7aea0626aa0f42d6bc31399aee6e7e90f.tar.gz api-ac5a25d7aea0626aa0f42d6bc31399aee6e7e90f.tar.bz2 api-ac5a25d7aea0626aa0f42d6bc31399aee6e7e90f.tar.xz api-ac5a25d7aea0626aa0f42d6bc31399aee6e7e90f.zip |
make the console less verbose
Diffstat (limited to 'src/routers/tmwa/index.js')
-rw-r--r-- | src/routers/tmwa/index.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/routers/tmwa/index.js b/src/routers/tmwa/index.js index 7e1cefe..495240b 100644 --- a/src/routers/tmwa/index.js +++ b/src/routers/tmwa/index.js @@ -22,10 +22,8 @@ module.exports = exports = class TMWA { this.router.get("/server", middlewares.server); - this.router.all("/account", rate_limit); // filter out the flood - this.router.all("/account", challenge); // require a captcha - this.router.use("/account", express.json()); // parse the body as json - this.router.post("/account", middlewares.account); + this.router.all("/account", rate_limit, challenge); // flood limit + captcha + this.router.post("/account", express.json(), middlewares.account); tmwa_poll(this); // first heartbeat @@ -39,7 +37,7 @@ const tmwa_poll = (_this) => { const lines = data.split("\n"); if (err || lines.length < 2) { - console.error("encountered an error while retrieving online.txt", err); + console.error("TMWA: encountered an error while retrieving online.txt", err); _this.timeout = setTimeout(() => tmwa_poll(_this), 30000); // <= it failed, so check again later return; } |