aboutsummaryrefslogtreecommitdiffstats
path: root/stripe.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2019-10-14 23:41:20 -0700
committerAdam Soltys <[email protected]>2019-10-14 23:41:20 -0700
commita3ae613d7e2cde43096dcd80f8a1e04a7fb2512f (patch)
treeb6a78851f106c9cf4849f140e5954da511588086 /stripe.js
parent7c77d82d6bb52662b98461c67b7240182ded8002 (diff)
downloadcoinos-server-a3ae613d7e2cde43096dcd80f8a1e04a7fb2512f.tar.gz
coinos-server-a3ae613d7e2cde43096dcd80f8a1e04a7fb2512f.zip
use database transaction when updating balance on block receipt
Diffstat (limited to 'stripe.js')
-rw-r--r--stripe.js3
1 files changed, 2 insertions, 1 deletions
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);
}
});