diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-29 20:32:18 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-29 20:32:18 +0900 |
| commit | cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f (patch) | |
| tree | 318279530d3392ee40d91968477fc0e78d5cf0f7 /src/server/api/streaming.ts | |
| parent | Update .travis.yml (diff) | |
| download | sharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.tar.gz sharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.tar.bz2 sharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.zip | |
整理した
Diffstat (limited to 'src/server/api/streaming.ts')
| -rw-r--r-- | src/server/api/streaming.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts index 73f099bd80..c86c6a8b4a 100644 --- a/src/server/api/streaming.ts +++ b/src/server/api/streaming.ts @@ -2,8 +2,8 @@ import * as http from 'http'; import * as websocket from 'websocket'; import * as redis from 'redis'; import config from '../../conf'; -import { default as User, IUser } from './models/user'; -import AccessToken from './models/access-token'; +import { default as User, IUser } from '../../models/user'; +import AccessToken from '../../models/access-token'; import isNativeToken from './common/is-native-token'; import homeStream from './stream/home'; @@ -15,6 +15,7 @@ import othelloStream from './stream/othello'; import serverStream from './stream/server'; import requestsStream from './stream/requests'; import channelStream from './stream/channel'; +import { ParsedUrlQuery } from 'querystring'; module.exports = (server: http.Server) => { /** @@ -51,7 +52,8 @@ module.exports = (server: http.Server) => { return; } - const user = await authenticate(request.resourceURL.query.i); + const q = request.resourceURL.query as ParsedUrlQuery; + const user = await authenticate(q.i as string); if (request.resourceURL.pathname === '/othello-game') { othelloGameStream(request, connection, subscriber, user); |