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 <test@example.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Qiaochu Hu
2026-04-22 05:38:15 +00:00
committed by GitHub
co-authored by Test User Claude Opus 4.7
parent f477f7749c
commit ee16d1d474
@@ -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 });