Skip to content

Open-source status page, incident response and uptime monitoring

🐛 notification

Thibault Le Ouay1ccf37919e93
diff --git a/packages/api/src/router/notification.ts b/packages/api/src/router/notification.ts
index 93c988f3e..9d33bf293 100644
--- a/packages/api/src/router/notification.ts
+++ b/packages/api/src/router/notification.ts
@@ -22,7 +22,7 @@ export const notificationRouter = createTRPCRouter({
const notificationLimit = getLimit(
opts.ctx.workspace.plan,
- "notification-channels",
+ "notification-channels"
);
const notificationNumber = (
@@ -83,8 +83,8 @@ export const notificationRouter = createTRPCRouter({
.where(
and(
eq(notification.id, opts.input.id),
- eq(notification.workspaceId, opts.ctx.workspace.id),
- ),
+ eq(notification.workspaceId, opts.ctx.workspace.id)
+ )
)
.returning()
.get();
@@ -98,8 +98,8 @@ export const notificationRouter = createTRPCRouter({
.where(
and(
eq(notification.id, opts.input.id),
- eq(notification.id, opts.input.id),
- ),
+ eq(notification.id, opts.input.id)
+ )
)
.run();
}),
@@ -114,7 +114,8 @@ export const notificationRouter = createTRPCRouter({
and(
eq(notification.id, opts.input.id),
eq(notification.id, opts.input.id),
- ),
+ eq(notification.workspaceId, opts.ctx.workspace.id)
+ )
)
.get();
@@ -134,7 +135,7 @@ export const notificationRouter = createTRPCRouter({
isNotificationLimitReached: protectedProcedure.query(async (opts) => {
const notificationLimit = getLimit(
opts.ctx.workspace.plan,
- "notification-channels",
+ "notification-channels"
);
const notificationNumbers = (
await opts.ctx.db.query.notification.findMany({