[API] Fix bug

This commit is contained in:
syuilo 2017-01-21 07:45:49 +09:00
parent 148b8ceae9
commit 1b499919b8

View file

@ -51,6 +51,10 @@ module.exports = (server: http.Server) => {
};
function authenticate(connection: websocket.connection, token: string): Promise<any> {
if (token == null) {
return Promise.resolve(null);
}
return new Promise(async (resolve, reject) => {
if (isNativeToken(token)) {
// Fetch user