tangled
alpha
login
or
join now
openstatus.dev
/
openstatus
5
fork
atom
Openstatus
www.openstatus.dev
5
fork
atom
overview
issues
pulls
pipelines
๐ notification
Thibault Le Ouay
2 years ago
1ccf3791
7e78d258
+8
-7
1 changed file
expand all
collapse all
unified
split
packages
api
src
router
notification.ts
+8
-7
packages/api/src/router/notification.ts
···
22
22
23
23
const notificationLimit = getLimit(
24
24
opts.ctx.workspace.plan,
25
25
-
"notification-channels",
25
25
+
"notification-channels"
26
26
);
27
27
28
28
const notificationNumber = (
···
83
83
.where(
84
84
and(
85
85
eq(notification.id, opts.input.id),
86
86
-
eq(notification.workspaceId, opts.ctx.workspace.id),
87
87
-
),
86
86
+
eq(notification.workspaceId, opts.ctx.workspace.id)
87
87
+
)
88
88
)
89
89
.returning()
90
90
.get();
···
98
98
.where(
99
99
and(
100
100
eq(notification.id, opts.input.id),
101
101
-
eq(notification.id, opts.input.id),
102
102
-
),
101
101
+
eq(notification.id, opts.input.id)
102
102
+
)
103
103
)
104
104
.run();
105
105
}),
···
114
114
and(
115
115
eq(notification.id, opts.input.id),
116
116
eq(notification.id, opts.input.id),
117
117
-
),
117
117
+
eq(notification.workspaceId, opts.ctx.workspace.id)
118
118
+
)
118
119
)
119
120
.get();
120
121
···
134
135
isNotificationLimitReached: protectedProcedure.query(async (opts) => {
135
136
const notificationLimit = getLimit(
136
137
opts.ctx.workspace.plan,
137
137
-
"notification-channels",
138
138
+
"notification-channels"
138
139
);
139
140
const notificationNumbers = (
140
141
await opts.ctx.db.query.notification.findMany({