add login and register logic
This commit is contained in:
parent
b05cb202b6
commit
46a127c217
7 changed files with 82 additions and 47 deletions
|
|
@ -16,7 +16,7 @@ wss.on("connection", function connection(ws, req) {
|
|||
ws.on("message", function incoming(message) {
|
||||
|
||||
console.log(message)
|
||||
if (message === 'no-token') {
|
||||
if (message === 'no-token' || message === 'undefined') {
|
||||
console.log('no token to authenticate');
|
||||
ws.send('locked');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue