Skip to content

Commit

Permalink
Fix blocking event
Browse files Browse the repository at this point in the history
  • Loading branch information
kearfy committed Jan 2, 2024
1 parent 7d4ecd3 commit 1c335f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/resources/invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type Invite = z.infer<typeof Invite>;
const enfore_unique_index = /* surrealql */ `
DEFINE EVENT enfore_unique_index ON invite THEN {
IF type::is::record(origin) {
UPDATE invite WHERE origin = $value.origin.email;
UPDATE invite WHERE origin = $value.origin.email AND target = $value.target;
};
};
`;
Expand Down

0 comments on commit 1c335f6

Please sign in to comment.