Skip to content

Commit

Permalink
Fix not being able to unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
kearfy committed Apr 24, 2024
1 parent 3430dab commit ef1c7b9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ export default function Page() {
} = useMutation({
mutationKey: ['registration', 'delete-registration', slug, regId],
async mutationFn() {
await surreal.delete(`attends:${slug}`);
await surreal.query(
/* surql */ `delete type::thing("attends", $regId)`,
{
regId,
}
);
router.push(`/e/${slug}`);
},
});
Expand Down

0 comments on commit ef1c7b9

Please sign in to comment.