Upgrade all the things.
This commit is contained in:
parent
95e7eff734
commit
7720653aeb
12 changed files with 728 additions and 784 deletions
|
@ -15,9 +15,9 @@ const queue = kue.createQueue({
|
|||
|
||||
const slackToken = process.env.SLACK_TOKEN;
|
||||
|
||||
export default async function (ctx) {
|
||||
export async function slack(ctx) {
|
||||
if (ctx.request.method === 'GET') {
|
||||
ctx.redirect('https://slack.com/oauth/authorize?client_id=349358389361.349904899522&team=TA9AJBFAM&install_redirect=general&scope=links:read,chat:write:bot');
|
||||
ctx.redirect('https://slack.com/oauth/authorize?client_id=349358389361.349904899522&install_redirect=general&scope=links:read,chat:write:bot');
|
||||
return;
|
||||
}
|
||||
if (ctx.request.body.challenge) {
|
||||
|
@ -56,3 +56,8 @@ export default async function (ctx) {
|
|||
ctx.body = 'OK';
|
||||
}
|
||||
|
||||
export async function oauth() {
|
||||
const { body } = await request.post('https://slack.com/api/oauth.access')
|
||||
.set('Authorization', `Bearer ${slackToken}`)
|
||||
.send(payload);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue