Skip to content

Commit

Permalink
refactor: flatten api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
cptchloroplast committed Oct 7, 2024
1 parent 7f85ef5 commit 708021c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/forms/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}, {})
const button: HTMLButtonElement = event.submitter
button.setAttribute("disabled", "disabled")
const response = await fetch(`/api/${action}`, {
const response = await fetch(`/${action}`, {
method,
headers: {
"Content-Type": "application/json",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function POST(context: APIContext) {
<p>Hi!</p>
<p>Thanks for subscribing to the email list!</p>
<p>We promise to never send you spam, unless you specifically request it!</p>
<a href="https://${site}/api/subscribe/confirm?${params.toString()}">Click here to confirm your subscription!</a>
<a href="https://${site}/subscribe/confirm?${params.toString()}">Click here to confirm your subscription!</a>
<p>Stay tuned for all the latest updates!</p>
<p>Ben</p>
`
Expand Down

0 comments on commit 708021c

Please sign in to comment.