Skip to content

Commit

Permalink
fix(website): get honeypot fields working again
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Feb 2, 2025
1 parent a353de9 commit 062016d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/website/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
const customer = await getCustomerFromCookie(request);
return {
isLoggedIn: !!customer,
honeypotInputProps: honeypot.getInputProps(),
honeypotInputProps: await honeypot.getInputProps(),
};
};

Expand Down
2 changes: 1 addition & 1 deletion apps/website/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const action = async ({ request }: Route.ActionArgs) => {
.with("contactSubmission", async () => {
let isSpam = false;
try {
honeypot.check(formData);
await honeypot.check(formData);
} catch (e) {
if (e instanceof SpamError) isSpam = true;
}
Expand Down

0 comments on commit 062016d

Please sign in to comment.