Parcourir la source

:fire: webpushr

visuddhinanda il y a 3 ans
Parent
commit
b922a82be3

+ 0 - 34
app/Http/Controllers/DiscussionController.php

@@ -91,40 +91,6 @@ class DiscussionController extends Controller
             }
         }
 
-        $end_point = 'https://api.webpushr.com/v1/notification/send/all';
-
-        $http_header = array(
-            "Content-Type: Application/Json",
-            "webpushrKey: 90ce3ace1b8e6cc7ea90cb810880b4de",
-            "webpushrAuthToken: 63019"
-        );
-
-        $req_data = array(
-            'title' 		=> "提问", //required
-            'message' 		=> "问题:".$request->get('title',""), //required
-            'target_url'	=> 'https://www.webpushr.com', //required
-
-            //following parameters are optional
-            //'name'		=> 'Test campaign',
-            //'icon'		=> 'https://cdn.webpushr.com/siteassets/wSxoND3TTb.png',
-            //'image'		=> 'https://cdn.webpushr.com/siteassets/aRB18p3VAZ.jpeg',
-            //'auto_hide'	=> 1,
-            //'expire_push'	=> '5m',
-            //'send_at'		=> '2022-01-04 10:47 +5:30',
-            'action_buttons'=> array(
-                array('title'=> '查看', 'url' => 'https://visuddhinanda.spring.wikipali.org'),
-            )
-        );
-
-        $ch = curl_init();
-        curl_setopt($ch, CURLOPT_HTTPHEADER, $http_header);
-        curl_setopt($ch, CURLOPT_URL, $end_point );
-        curl_setopt($ch, CURLOPT_POST, 1);
-        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($req_data) );
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-
-        $response = curl_exec($ch);
-
         return $this->ok(new DiscussionResource($discussion));
     }
 

BIN
public/__MACOSX/._webpushr-sw.js


+ 0 - 1
public/app/pcdl/html_foot.php

@@ -34,7 +34,6 @@
 	guide_init();
 </script>
 
-<!-- start webpushr code --> <script>(function(w,d, s, id) {if(typeof(w.webpushr)!=='undefined') return;w.webpushr=w.webpushr||function(){(w.webpushr.q=w.webpushr.q||[]).push(arguments)};var js, fjs = d.getElementsByTagName(s)[0];js = d.createElement(s); js.id = id;js.async=1;js.src = "https://cdn.webpushr.com/app.min.js";fjs.parentNode.appendChild(js);}(window,document, 'script', 'webpushr-jssdk'));webpushr('setup',{'key':'BIsBVIlhOM7SHtE-ty8pZpylJYwzD_iwutNoonk9FfwtkP7weyFmO1y6h5OrSEBuwuUqCWboh4120R_X_kAil5Y' });</script><!-- end webpushr code -->
 </body>
 
 </html>

+ 0 - 1
public/webpushr-sw.js

@@ -1 +0,0 @@
-importScripts('https://cdn.webpushr.com/sw-server.min.js');