Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jabis Sevón
/
gun-multiserver
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1fff05b8
authored
2020-05-01 20:21:35 +0700
by
Jabis Sevón
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
user creation stuff
1 parent
af095df8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
server.js
server.js
View file @
1fff05b
...
...
@@ -87,11 +87,11 @@ server.on("upgrade", async function(request, socket, head) {
let
obj
=
{
roomname
:
roomname
,
creator
:
creator
,
socket
:{}};
if
(
sig
)
{
let
user
=
g
.
user
();
user
.
create
(
user
name
,
sig
,
async
function
(
ack
){
user
.
create
(
room
name
,
sig
,
async
function
(
ack
){
console
.
log
(
"We've got ack"
,
ack
);
if
(
ack
.
err
){
console
.
log
(
"error in user.create"
,
ack
.
err
);
}
let
auth
=
await
new
Promise
((
res
,
rej
)
=>
{
return
user
.
auth
(
user
name
,
sig
,
res
);
return
user
.
auth
(
room
name
,
sig
,
res
);
});
if
(
auth
.
err
){
console
.
log
(
'error in auth'
,
auth
.
err
);
}
console
.
log
(
"auth"
,
auth
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment