File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 55require 'vendor/autoload.php ' ;
66
77$ app = new \Slim \App ;
8- $ app ->any ('/webhooks/answer ' , function (Request $ request , Response $ response ) {
9- // Nexmo may send a GET or a POST request, depending on your account
10- // settings. Reject anything that isn't a GET/POST
11- if (!in_array ($ request ->getMethod (), ['GET ' , 'POST ' ])) {
12- return $ response ->withStatus (404 );
13- }
14-
15- $ params = $ request ->getParsedBody ();
16-
17- // Fall back to reading the query string if the body is empty
18- if (!isset ($ params ['from ' ])) {
19- $ params = $ request ->getQueryParams ();
20- }
21-
8+ $ app ->get ('/webhooks/answer ' , function (Request $ request , Response $ response ) {
9+ $ params = $ request ->getQueryParams ();
2210 $ fromSplitIntoCharacters = implode (" " , str_split ($ params ['from ' ]));
2311
2412 $ ncco = [
You can’t perform that action at this time.
0 commit comments