fix: use strict equality in webhook delete handler role check (#28958)

Replaced `==` with `===` for the ADMIN role comparison to follow
TypeScript best practices and match the project's coding conventions.

Co-authored-by: Test User <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-04-22 05:38:15 +00:00
1 parent f477f7749c
commit ee16d1d474
1 file changed
+1 -1
@@ -20,7 +20,7 @@ export const deleteHandler = async ({ ctx, input }: DeleteOptions) => {
if (Array.isArray(where.AND)) {
if (input.eventTypeId) {
where.AND.push({ eventTypeId: input.eventTypeId });
} else if (ctx.user.role == "ADMIN") {
} else if (ctx.user.role === "ADMIN") {
where.AND.push({ OR: [{ platform: true }, { userId: ctx.user.id }] });
} else {
where.AND.push({ userId: ctx.user.id });