diff options
| author | Adam Soltys <[email protected]> | 2020-05-13 14:31:44 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-13 14:31:44 -0700 |
| commit | 816bfa54afd50059d781a9da5dc953611b9fdc66 (patch) | |
| tree | 543ca23173d316ec4f2c53f8b2cd84125bf6f33e /routes | |
| parent | baba2be1a1ae06833ee324948cd1b8d339ed5323 (diff) | |
| download | coinos-server-816bfa54afd50059d781a9da5dc953611b9fdc66.tar.gz coinos-server-816bfa54afd50059d781a9da5dc953611b9fdc66.zip | |
use ws instead of socket.io
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routes/users.js b/routes/users.js index 6e0d13d1..9089b435 100644 --- a/routes/users.js +++ b/routes/users.js @@ -1,7 +1,6 @@ const axios = require("axios"); const bcrypt = require("bcrypt"); const jwt = require("jsonwebtoken"); -const uuidv4 = require("uuid/v4"); const authenticator = require("otplib").authenticator; const pick = (O, ...K) => K.reduce((o, k) => ((o[k] = O[k]), o), {}); @@ -231,7 +230,7 @@ app.post("/user", auth, async (req, res) => { if (user.username !== username && exists) { return res.status(500).send("Username taken"); } else { - sids[username] = sids[user.username]; + sockets[username] = sockets[user.username]; user.username = username; addresses[user.address] = username; addresses[user.liquid] = user.username; |
