From 4b08677839b2441f634f015e33c3f80da1c266d9 Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Thu, 11 Oct 2018 02:48:19 +0900 Subject: [PATCH] :v: --- src/server/api/stream/channels/games/reversi-game.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/api/stream/channels/games/reversi-game.ts b/src/server/api/stream/channels/games/reversi-game.ts index 54d9d1ae1..d3d3c0f5a 100644 --- a/src/server/api/stream/channels/games/reversi-game.ts +++ b/src/server/api/stream/channels/games/reversi-game.ts @@ -1,5 +1,6 @@ import autobind from 'autobind-decorator'; import * as CRC32 from 'crc-32'; +import * as mongo from 'mongodb'; import ReversiGame, { pack } from '../../../../../models/games/reversi/game'; import { publishReversiGameStream } from '../../../../../stream'; import Reversi from '../../../../../games/reversi/core'; @@ -7,11 +8,11 @@ import * as maps from '../../../../../games/reversi/maps'; import Channel from '../../channel'; export default class extends Channel { - private gameId: string; + private gameId: mongo.ObjectID; @autobind public async init(params: any) { - this.gameId = params.gameId as string; + this.gameId = new mongo.ObjectID(params.gameId as string); // Subscribe game stream this.subscriber.on(`reversiGameStream:${this.gameId}`, data => {