diff options
| author | Adam Soltys <[email protected]> | 2020-04-28 22:09:22 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-04-28 22:33:02 -0700 |
| commit | 63c18105e6c66b3b4698c398f356bef1b496816f (patch) | |
| tree | e7ee85e7c3502ed81954448a76be028143990948 /routes/users.js | |
| parent | 994dd93f6c45c590ae59a699cbf425d96518da1e (diff) | |
| download | coinos-server-63c18105e6c66b3b4698c398f356bef1b496816f.tar.gz coinos-server-63c18105e6c66b3b4698c398f356bef1b496816f.zip | |
include account in emitted payments objects
Diffstat (limited to 'routes/users.js')
| -rw-r--r-- | routes/users.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/routes/users.js b/routes/users.js index d77cd8a0..9e2700b0 100644 --- a/routes/users.js +++ b/routes/users.js @@ -124,6 +124,9 @@ app.post("/register", async (req, res) => { asset: config.liquid.btcasset, balance: 0, pending: 0, + name: 'Bitcoin', + ticker: 'BTC', + precision: 8, }); user.accounts = [account]; @@ -131,9 +134,10 @@ app.post("/register", async (req, res) => { user.account_id = account.id; await user.save(); - - l.info("new user", user.username); + user = await getUser(user.username); res.send(pick(user, ...whitelist)); + emit(user.username, "user", user); + l.info("new user", user.username); }); app.post("/disable2fa", auth, twofa, async (req, res) => { |
