Przeglądaj źródła

切换钉钉报警的地址

liuzejian 2 lat temu
rodzic
commit
c928abc44f
3 zmienionych plików z 4 dodań i 5 usunięć
  1. 1 1
      app/Libs/Helpers.php
  2. 2 0
      config/common.php
  3. 1 4
      tests/ExampleTest.php

+ 1 - 1
app/Libs/Helpers.php

@@ -770,7 +770,7 @@ function proportion($value1, $value2, $gcd)
  */
 function sendNotice($message)
 {
-    $webHook = 'https://oapi.dingtalk.com/robot/send?access_token=bd4a583857c84241903aeeaf3864e8e2b776974e1f69d8ff98ed36eddbe86e1d';
+    $webHook = config('common.dingTalk');
     $data    = [
         'msgtype' => 'text',
         'text'    => [

+ 2 - 0
config/common.php

@@ -19,4 +19,6 @@ return [
 
 
     'click_type'=>1,
+
+    'dingTalk' => 'https://oapi.dingtalk.com/robot/send?access_token=f1d1492eccbc77c0567f4dc4d61e99454eacfef8b609156761c9d14510f84e6e',
 ];

+ 1 - 4
tests/ExampleTest.php

@@ -13,9 +13,6 @@ class ExampleTest extends TestCase
      */
     public function testBasicExample()
     {
-        $response = $this->get('/');
-
-        $response->assertStatus(200);
-
+        sendNotice('失败-测试-无需理会');
     }
 }