401 message fix

pull/9078/head
Syed Ali Shahbaz 2022-06-08 13:28:22 +05:30 committed by GitHub
parent 9b1dffbdb9
commit db6f5cad15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -111,9 +111,8 @@ export async function WebhookById(
// Team should be available and the user should be a member of the team
if (!team?.members.some((membership) => membership.userId === userId)) {
throw new TRPCError({
code: "UNAUTHORIZED",
});
res.status(401).json({ message: "Unauthorized" });
return;
}
}
await prisma.webhook