401 message fix

This commit is contained in:
Syed Ali Shahbaz authored and GitHub committed 2022-06-08 13:28:22 +05:30
1 parent 9b1dffbdb9
commit db6f5cad15
1 file changed
+2 -3
+2 -3
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