Fixes: Adding Slack command

This commit is contained in:
Tom Moor
2017-10-19 21:02:39 -07:00
parent e4e2ac8aa1
commit d0dbe4cf02
2 changed files with 16 additions and 21 deletions

View File

@@ -15,7 +15,6 @@ export async function request(endpoint: string, body: Object) {
} catch (e) {
throw httpErrors.BadRequest();
}
console.log('DATA', data);
if (!data.ok) throw httpErrors.BadRequest(data.error);
return data;
@@ -28,7 +27,7 @@ export async function oauthAccess(
return request('oauth.access', {
client_id: process.env.SLACK_KEY,
client_secret: process.env.SLACK_SECRET,
redirect_uri: `${process.env.URL || ''}/auth/slack`,
redirect_uri,
code,
});
}