Browse Source

disable debug

pull/10/head
Aaron Parecki 8 years ago
parent
commit
13d4b32894
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      controllers/alexa.php

+ 2
- 4
controllers/alexa.php View File

@ -61,8 +61,6 @@ $app->post('/alexa/login', function() use($app) {
$req = $app->request();
$params = $req->params();
file_put_contents('logs/login.txt', json_encode($params));
$required = ['code', 'client_id', 'state', 'redirect_uri'];
$params_present = array_keys($params);
@ -177,7 +175,6 @@ $app->post('/alexa/endpoint', function() use($app) {
$alexaRequest = \Alexa\Request\Request::fromData($json);
if($alexaRequest instanceof Alexa\Request\IntentRequest) {
# file_put_contents('logs/request.txt', $input);
# Verify the access token
try {
@ -249,7 +246,8 @@ $app->post('/alexa/endpoint', function() use($app) {
$response = new \Alexa\Response\Response;
$response->respond('Got it!')
->withCard('You '.$action.': '.$food);
->withCard('You '.$action.': '.$food, $url)
->endSession(true);
$app->response()['Content-type'] = 'application/json';
$app->response()->body(json_encode($response->render()));

Loading…
Cancel
Save