aboutsummaryrefslogtreecommitdiffstats
path: root/routes/users.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-12-16 17:31:18 -0800
committerAdam Soltys <[email protected]>2021-12-16 17:31:18 -0800
commit14d870dec052c4ae279933983d56ab6a0149bc1e (patch)
tree04fb88451f4bc08753b185095afd170acd2262dd /routes/users.js
parentd23f225a306c29fc3416233f98a7316996686c22 (diff)
downloadcoinos-server-14d870dec052c4ae279933983d56ab6a0149bc1e.tar.gz
coinos-server-14d870dec052c4ae279933983d56ab6a0149bc1e.zip
handle taproot address index
Diffstat (limited to 'routes/users.js')
-rw-r--r--routes/users.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 7ea91413..df42d82d 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -28,6 +28,14 @@ const twofa = ah((req, res, next) => {
});
app.get(
+ "/me",
+ auth,
+ ah(async (req, res) => {
+ res.send(req.user);
+ })
+);
+
+app.get(
"/users/:username",
ah(async (req, res) => {
const { username } = req.params;
@@ -785,7 +793,7 @@ app.post(
if (config.bitcoin.walletpass)
await bc.walletPassphrase(config.bitcoin.walletpass, 300);
return res.send(await bc.signMessage(address, message));
- }
+ }
res.status(500).send("Address not found for user");
})