Skip to content

Commit

Permalink
adding the token to the error response
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdevwords authored and chrisdevwords committed Mar 11, 2017
1 parent 69a70df commit 58e35f8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ function handler(event, context, callback) {
const { command, text, token } = body || {};
// eslint-disable-next-line camelcaseå
const user = body.user_name;
const {
SLACK_TOKEN,
SPOTIFY_LOCAL_URL
} = process.env;

if (token !== SLACK_TOKEN) {
if (token !== process.env.SLACK_TOKEN) {
return callback(null,
slackResp('Token is invalid.', 401, TYPE_PRIVATE)
slackResp(`Token: "${token}" is invalid.`, 401, TYPE_PRIVATE)
);
}

Expand Down

0 comments on commit 58e35f8

Please sign in to comment.