lrf402788946 4 năm trước cách đây
mục cha
commit
acde7edb1c
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/service/liveroom.js

+ 2 - 1
app/service/liveroom.js

@@ -46,7 +46,8 @@ class LiveroomService extends CrudService {
       list = list.filter(f => f.userid !== userid);
     }
     list = _.uniqBy(list, 'userid');
-    await this.app.redis.set(`liveroom${number}`, JSON.stringify(list));
+    list = JSON.stringify(list);
+    await this.app.redis.set(`liveroom${number}`, list);
     const { mq } = this.ctx;
     if (mq) {
       const exchange = 'liveroom-personcount';