Skip to content

Commit

Permalink
Adding country to giving-form
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljolley committed Dec 2, 2024
1 parent 689bf24 commit 6cdb639
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/giving/GivingForm.astro
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ const { user } = Astro.props;
required
/>
</p>
<p>
<label for="country">Country</label><br />
<input
id="country"
type="text"
name="country"
placeholder="US"
required
/>
</p>
<p>
<label for="zip">Postal Code</label><br />
<input
Expand Down
2 changes: 2 additions & 0 deletions src/pages/api/auth/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const POST: APIRoute = async ({ request, cookies, redirect }) => {
const city = form.get("city");
const state = form.get("state");
const zip = form.get("zip");
const country = form.get("country");
const tshirt = form.get("tshirt");

await registerSub({
Expand All @@ -40,6 +41,7 @@ export const POST: APIRoute = async ({ request, cookies, redirect }) => {
city,
state,
zip,
country,
tshirt,
});

Expand Down

0 comments on commit 6cdb639

Please sign in to comment.