forked from FoundKeyGang/FoundKey
Fix
This commit is contained in:
parent
44b6ddb262
commit
43e6ddc1e4
1 changed files with 6 additions and 2 deletions
|
@ -59,7 +59,9 @@ function authenticate(connection: websocket.connection, token: string): Promise<
|
||||||
.findOne({
|
.findOne({
|
||||||
token: token
|
token: token
|
||||||
}, {
|
}, {
|
||||||
|
fields: {
|
||||||
_id: true
|
_id: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
resolve(user);
|
resolve(user);
|
||||||
|
@ -76,7 +78,9 @@ function authenticate(connection: websocket.connection, token: string): Promise<
|
||||||
// SELECT _id
|
// SELECT _id
|
||||||
const user = await User
|
const user = await User
|
||||||
.findOne({ _id: accessToken.user_id }, {
|
.findOne({ _id: accessToken.user_id }, {
|
||||||
|
fields: {
|
||||||
_id: true
|
_id: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
resolve(user);
|
resolve(user);
|
||||||
|
|
Loading…
Reference in a new issue