Skip to content

Commit ee16d1d

Browse files
hobostayTest Userclaude
authored
fix: use strict equality in webhook delete handler role check (calcom#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>
1 parent f477f77 commit ee16d1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/trpc/server/routers/viewer/webhook/delete.handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const deleteHandler = async ({ ctx, input }: DeleteOptions) => {
2020
if (Array.isArray(where.AND)) {
2121
if (input.eventTypeId) {
2222
where.AND.push({ eventTypeId: input.eventTypeId });
23-
} else if (ctx.user.role == "ADMIN") {
23+
} else if (ctx.user.role === "ADMIN") {
2424
where.AND.push({ OR: [{ platform: true }, { userId: ctx.user.id }] });
2525
} else {
2626
where.AND.push({ userId: ctx.user.id });

0 commit comments

Comments
 (0)