From a3ae613d7e2cde43096dcd80f8a1e04a7fb2512f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 14 Oct 2019 23:41:20 -0700 Subject: use database transaction when updating balance on block receipt --- stripe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stripe.js') diff --git a/stripe.js b/stripe.js index ba1f68f7..090def4b 100644 --- a/stripe.js +++ b/stripe.js @@ -1,4 +1,5 @@ const config = require("./config"); +const l = console.log; module.exports = (auth, app, db, emit) => { app.post("/buy", auth, async (req, res) => { @@ -33,7 +34,7 @@ module.exports = (auth, app, db, emit) => { res.send(`Bought ${amount}`); } catch (e) { - console.log(e); + l(e); res.status(500).send(e); } }); -- cgit v1.2.3