Github integration (#6414)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -55,15 +55,6 @@ const scopes = [
|
||||
"identity.team",
|
||||
];
|
||||
|
||||
function redirectOnClient(ctx: Context, url: string) {
|
||||
ctx.type = "text/html";
|
||||
ctx.body = `
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0;URL='${url}'"/>
|
||||
</head>`;
|
||||
}
|
||||
|
||||
if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
|
||||
const strategy = new SlackStrategy(
|
||||
{
|
||||
@@ -164,7 +155,7 @@ if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
|
||||
const team = await Team.findByPk(teamId, {
|
||||
rejectOnEmpty: true,
|
||||
});
|
||||
return redirectOnClient(
|
||||
return ctx.redirectOnClient(
|
||||
ctx,
|
||||
SlackUtils.connectUrl({
|
||||
baseUrl: team.url,
|
||||
|
||||
Reference in New Issue
Block a user