fix(dashboard): remove popup from slack integrations
This commit is contained in:
@@ -18,7 +18,8 @@ export const slackInstaller = new InstallProvider({
|
||||
export const getSlackInstallUrl = ({
|
||||
integrationId,
|
||||
organizationId,
|
||||
}: { integrationId: string; organizationId: string }) => {
|
||||
projectId,
|
||||
}: { integrationId: string; organizationId: string; projectId: string }) => {
|
||||
return slackInstaller.generateInstallUrl({
|
||||
scopes: [
|
||||
'incoming-webhook',
|
||||
@@ -27,7 +28,7 @@ export const getSlackInstallUrl = ({
|
||||
'team:read',
|
||||
],
|
||||
redirectUri: SLACK_OAUTH_REDIRECT_URL,
|
||||
metadata: JSON.stringify({ integrationId, organizationId }),
|
||||
metadata: JSON.stringify({ integrationId, organizationId, projectId }),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ export const integrationRouter = createTRPCRouter({
|
||||
slackInstallUrl: await getSlackInstallUrl({
|
||||
integrationId: res.id,
|
||||
organizationId: input.organizationId,
|
||||
projectId: input.projectId,
|
||||
}),
|
||||
};
|
||||
}
|
||||
@@ -84,6 +85,7 @@ export const integrationRouter = createTRPCRouter({
|
||||
slackInstallUrl: await getSlackInstallUrl({
|
||||
integrationId: res.id,
|
||||
organizationId: input.organizationId,
|
||||
projectId: input.projectId,
|
||||
}),
|
||||
};
|
||||
}),
|
||||
|
||||
@@ -214,6 +214,7 @@ const zCreateIntegration = z.object({
|
||||
id: z.string().optional(),
|
||||
name: z.string().min(1),
|
||||
organizationId: z.string().min(1),
|
||||
projectId: z.string().min(1),
|
||||
});
|
||||
|
||||
export const zCreateSlackIntegration = zCreateIntegration;
|
||||
|
||||
Reference in New Issue
Block a user