Skip to content

Commit 20271df

Browse files
committed
Fixes for Slack channel disconnecting and reconnecting flow
1 parent 9903301 commit 20271df

4 files changed

+7
-3
lines changed

apps/webapp/app/presenters/v3/NewAlertChannelPresenter.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class NewAlertChannelPresenter extends BasePresenter {
2020
where: {
2121
service: "SLACK",
2222
organizationId: project.organizationId,
23+
deletedAt: null,
2324
},
2425
orderBy: {
2526
createdAt: "desc",

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
2828
where: {
2929
service: "SLACK",
3030
organizationId: project.organizationId,
31+
deletedAt: null,
3132
},
3233
});
3334

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
2727
where: {
2828
service: "SLACK",
2929
organizationId: project.organizationId,
30+
deletedAt: null,
3031
},
3132
});
3233

apps/webapp/app/v3/services/alerts/createAlertChannel.server.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2-
ProjectAlertChannel,
3-
ProjectAlertType,
4-
RuntimeEnvironmentType,
2+
type ProjectAlertChannel,
3+
type ProjectAlertType,
4+
type RuntimeEnvironmentType,
55
} from "@trigger.dev/database";
66
import { nanoid } from "nanoid";
77
import { env } from "~/env.server";
@@ -69,6 +69,7 @@ export class CreateAlertChannelService extends BaseService {
6969
type: options.channel.type,
7070
properties: await this.#createProperties(options.channel),
7171
environmentTypes,
72+
enabled: true,
7273
},
7374
});
7475

0 commit comments

Comments
 (0)