summaryrefslogtreecommitdiff
path: root/src/server/api/stream/othello-game.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-29 20:32:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-29 20:32:18 +0900
commitcf33e483f7e6f40e8cbbbc0118a7df70bdaf651f (patch)
tree318279530d3392ee40d91968477fc0e78d5cf0f7 /src/server/api/stream/othello-game.ts
parentUpdate .travis.yml (diff)
downloadsharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.tar.gz
sharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.tar.bz2
sharkey-cf33e483f7e6f40e8cbbbc0118a7df70bdaf651f.zip
整理した
Diffstat (limited to 'src/server/api/stream/othello-game.ts')
-rw-r--r--src/server/api/stream/othello-game.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/api/stream/othello-game.ts b/src/server/api/stream/othello-game.ts
index e48d93cddc..b6a251c4c8 100644
--- a/src/server/api/stream/othello-game.ts
+++ b/src/server/api/stream/othello-game.ts
@@ -1,13 +1,15 @@
import * as websocket from 'websocket';
import * as redis from 'redis';
import * as CRC32 from 'crc-32';
-import OthelloGame, { pack } from '../models/othello-game';
+import OthelloGame, { pack } from '../../../models/othello-game';
import { publishOthelloGameStream } from '../event';
-import Othello from '../../common/othello/core';
-import * as maps from '../../common/othello/maps';
+import Othello from '../../../common/othello/core';
+import * as maps from '../../../common/othello/maps';
+import { ParsedUrlQuery } from 'querystring';
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void {
- const gameId = request.resourceURL.query.game;
+ const q = request.resourceURL.query as ParsedUrlQuery;
+ const gameId = q.game;
// Subscribe game stream
subscriber.subscribe(`misskey:othello-game-stream:${gameId}`);