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