lrf402788946 há 4 anos atrás
pai
commit
acde7edb1c
1 ficheiros alterados com 2 adições e 1 exclusões
  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';