[API] Fix bug
This commit is contained in:
parent
43e6ddc1e4
commit
225c89a5b8
|
@ -51,6 +51,10 @@ module.exports = (server: http.Server) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function authenticate(connection: websocket.connection, token: string): Promise<any> {
|
function authenticate(connection: websocket.connection, token: string): Promise<any> {
|
||||||
|
if (token == null) {
|
||||||
|
return Promise.resolve(null);
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
if (isNativeToken(token)) {
|
if (isNativeToken(token)) {
|
||||||
// Fetch user
|
// Fetch user
|
||||||
|
|
Loading…
Reference in New Issue