Send the invitation as a light letter that names the community, the inviter by email, and who can read the Rule.

This commit is contained in:
adilallo committed 2026-11-06 09:00:44 -07:00
1 parent 70ceb73104
commit 727a92a9ac
14 files changed
+534 -26

No files matched your search

+4 -1
View File
@@ -31,7 +31,7 @@ type RouteContext = { params: Promise<{ id: string }> };
async function ownedRuleMeta(ruleId: string, userId: string) {
return prisma.publishedRule.findFirst({
where: { id: ruleId, userId },
select: { id: true, title: true },
select: { id: true, title: true, summary: true, document: true },
});
}
@@ -159,8 +159,11 @@ export const POST = apiRoute<RouteContext>(
origin,
ruleId: rule.id,
ruleTitle: rule.title,
summary: rule.summary,
document: rule.document,
email,
invitedByUserId: user.id,
inviterEmail: user.email,
pepper,
});