lrf402788946 5 rokov pred
rodič
commit
299250ceb7
3 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 2 2
      app.js
  2. 1 1
      app/controller/.chat.js
  3. 1 1
      app/service/chat.js

+ 2 - 2
app.js

@@ -6,9 +6,9 @@ class AppBootHook {
 
   async didReady() {
     // 应用已经启动完毕
-    const ctx = await this.app.createAnonymousContext();
+    // const ctx = await this.app.createAnonymousContext();
     // 企业入驻申请消息接收事件
-    await ctx.service.rabbitmq.receiveQueueMsg('public_chat');
+    // await ctx.service.rabbitmq.receiveQueueMsg('public_chat');
   }
 
   async serverDidReady() {

+ 1 - 1
app/controller/.chat.js

@@ -29,7 +29,7 @@ module.exports = {
     options: {
       query: ["skip", "limit"],
       sort: ["meta.createdAt"],
-      asc: true,
+      desc: true,
       count: true,
     },
   },

+ 1 - 1
app/service/chat.js

@@ -25,7 +25,7 @@ class ChatService extends CrudService {
         headers: {
           userid: 1,
         } };
-      await mq.topic(exchange, '1', content, parm);
+      await mq.topic(exchange, '1', res.data, parm);
     }
     return res;
   }