From 6fe6c1b9d715e7501ada4505af46062714a3d055 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 23 Sep 2021 23:18:00 -0700 Subject: request logger --- routes/assets.js | 2 ++ routes/payments.js | 3 +++ 2 files changed, 5 insertions(+) (limited to 'routes') diff --git a/routes/assets.js b/routes/assets.js index b33e43b4..14d2c705 100644 --- a/routes/assets.js +++ b/routes/assets.js @@ -76,6 +76,8 @@ app.post( const { id: user_id } = req.user; const blind = false; + if (!user_id) throw new Error("unauthorized"); + const { address, domain, diff --git a/routes/payments.js b/routes/payments.js index 7ecfb36f..efe178b3 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -162,6 +162,9 @@ ah(async () => { if (unaccounted.length) l.warn("wallet transactions missing from database", unaccounted); + + // let s = fs.createWriteStream("exceptions", { flags: "a" }); + // unaccounted.map(tx => s.write(tx + "\n")); }; setTimeout(sanity, 5000); -- cgit v1.2.3