diff options
author | gumi <git@gumi.ca> | 2019-05-25 23:24:51 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2019-05-25 23:24:51 -0400 |
commit | fb046276622309038be3357bc93ed8f1a8568102 (patch) | |
tree | 731b6919476a9ac08f17a4a3fb1ca8d0c7a25ad3 /src/routers/tmwa/middlewares/account.js | |
parent | 6731de13eab82469ac0ccd365cf84586b08ee0c5 (diff) | |
download | apiv1-2.1.0.tar.gz apiv1-2.1.0.tar.bz2 apiv1-2.1.0.tar.xz apiv1-2.1.0.zip |
send to webhook on successful account creationv2.1.0
Diffstat (limited to 'src/routers/tmwa/middlewares/account.js')
-rw-r--r-- | src/routers/tmwa/middlewares/account.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routers/tmwa/middlewares/account.js b/src/routers/tmwa/middlewares/account.js index 3c82dbc..bc96b6c 100644 --- a/src/routers/tmwa/middlewares/account.js +++ b/src/routers/tmwa/middlewares/account.js @@ -142,7 +142,7 @@ const create_account = (req, res, next) => { res.status(201).json({ status: "success" }); - console.info("TMWA.account: an account was created: %s [%s]", req.body.username, req.ip); + req.app.locals.logger.info("TMWA.account: an account was created: %s [%s]", req.body.username, req.ip); req.app.locals.rate_limiting.add(req.ip); setTimeout(() => req.app.locals.rate_limiting.delete(req.ip), 300000); @@ -155,7 +155,7 @@ const create_account = (req, res, next) => { subject: "The Mana World account registration", text: `Your account (\"${req.body.username}\") was created successfully.\nHave fun playing The Mana World!` }, (err, info) => { - console.info("TMWA.account: sent account creation email: %s %s", req.body.username, info.messageId); + req.app.locals.logger.info("TMWA.account: sent account creation email: %s %s", req.body.username, info.messageId); }); }); child.stdin.end(); |