Selaa lähdekoodia

增加iospush 通知

flyzto 1 kuukausi sitten
vanhempi
commit
b122dc9f5d
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      server/models/GamesPs.js

+ 9 - 1
server/models/GamesPs.js

@@ -1471,7 +1471,15 @@ const notifyException = (message) => {
     return Logs.out('notifyException', { message });
   }
   const chat_id = -1003032820471;
-  axios.get(`${BASE_API_URL}/telegram/jump`, { params: { chat_id, message } }, { proxy: false })
+  Promise.all([
+    axios.get(`${BASE_API_URL}/telegram/jump`, { params: { chat_id, message } }, { proxy: false }),
+    axios.post('https://push.long.bid/bark', {
+      title: 'QBoss异常通知',
+      content: message,
+      topic: 'pstery',
+      icon: 'https://bwh.flyzto.com/icon/ball.png',
+    }, { proxy: false }),
+  ])
   .then(() => {
     Logs.out('notifyException', '通知成功');
   })