|
@@ -11,9 +11,10 @@ class HomeController extends Controller {
|
|
|
async exitroom() {
|
|
|
const { ctx } = this;
|
|
|
const { uid, roomid } = this.ctx.query;
|
|
|
- await this.ctx.controller.chat.index();
|
|
|
+ // await ctx.app.io.controller.chat.message();
|
|
|
const newdata = { uid, roomid };
|
|
|
- this.ctx.socket.emit('message', JSON.stringify(newdata));
|
|
|
+ ctx.app.io.of('/').emit('message', JSON.stringify(newdata));
|
|
|
+ // await this.ctx.socket.emit('message', JSON.stringify(newdata));
|
|
|
ctx.body = 'hi, egg';
|
|
|
}
|
|
|
}
|