diff options
| author | Adam Soltys <[email protected]> | 2022-12-21 21:50:06 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-21 21:50:06 -0800 |
| commit | 316039601e5170d6f753cf09eac92a94176b4756 (patch) | |
| tree | 35ebb19bae1857b919b2e51d11817c8bb432b012 /routes | |
| parent | a574285fe3b1de4fdfda342ed287bbc53a57400a (diff) | |
| download | coinos-server-316039601e5170d6f753cf09eac92a94176b4756.tar.gz coinos-server-316039601e5170d6f753cf09eac92a94176b4756.zip | |
store nostr keys
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/events.js | 7 | ||||
| -rw-r--r-- | routes/users.js | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/routes/events.js b/routes/events.js index 460d09a5..ab682b46 100644 --- a/routes/events.js +++ b/routes/events.js @@ -28,3 +28,10 @@ app.get("/:pubkey/events", async (req, res) => { res.code(500).send("problem fetching user events"); } }); + +app.post('/nostr/send', async (req, res) => { + let { event } = req.body; + pool.send(["EVENT", event]); + res.send(event); +}); + diff --git a/routes/users.js b/routes/users.js index 8d45e8c3..82a71549 100644 --- a/routes/users.js +++ b/routes/users.js @@ -132,6 +132,8 @@ app.post("/user", auth, async (req, res) => { let { user } = req; let { address, + cipher, + pubkey, confirm, currencies, currency, @@ -140,6 +142,7 @@ app.post("/user", auth, async (req, res) => { password, newpin, pin, + salt, seed, tokens, twofa, @@ -170,6 +173,10 @@ app.post("/user", auth, async (req, res) => { } if (unit) user.unit = unit; + if (cipher) user.cipher = cipher; + if (pubkey) user.pubkey = pubkey; + if (salt) user.salt = salt; + user.currency = currency; user.currencies = currencies; user.pin = newpin; |
