Skip to content

Commit 3176230

Browse files
committed
merge main
2 parents 9cde663 + fb2ef05 commit 3176230

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- Added analytics dashboard. [#358](https://github.com/sourcebot-dev/sourcebot/pull/358)
1212

13+
### Fixed
14+
- Fixed issue where invites appeared to be created successfully, but were not actually being created in the database. [#359](https://github.com/sourcebot-dev/sourcebot/pull/359)
15+
1316
### Changed
1417
- Audit logging is now enabled by default. [#358](https://github.com/sourcebot-dev/sourcebot/pull/358)
1518

packages/web/src/actions.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,15 @@ export const createInvites = async (emails: string[], domain: string): Promise<{
10551055
} satisfies ServiceError;
10561056
}
10571057

1058+
await prisma.invite.createMany({
1059+
data: emails.map((email) => ({
1060+
recipientEmail: email,
1061+
hostUserId: userId,
1062+
orgId: org.id,
1063+
})),
1064+
skipDuplicates: true,
1065+
});
1066+
10581067
// Send invites to recipients
10591068
if (env.SMTP_CONNECTION_URL && env.EMAIL_FROM_ADDRESS) {
10601069
const origin = (await headers()).get('origin')!;

0 commit comments

Comments
 (0)