Skip to content

Commit

Permalink
verifying token is present. deploy test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdevwords authored and chrisdevwords committed Aug 12, 2017
1 parent c579bb3 commit 58bf3a5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ const { response } = require('./util/lambda')
function handler(event, context, callback) {

const { body } = event;
const { SPOTIFY_CLIENT_ID, SPOTIFY_SECRET } = process.env;
const {
SPOTIFY_USER_ACCESS_TOKEN,
SPOTIFY_LOCAL_URL,
SLACK_TOKEN
} = process.env;

let message = 'no token...';
if (SPOTIFY_USER_ACCESS_TOKEN) {
message = 'It works!'
}
callback(null, response({
message: 'It works!',
body: body
message,
body
}));
}

Expand Down

0 comments on commit 58bf3a5

Please sign in to comment.