diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte
index acba3b1..827ce70 100644
--- a/src/routes/login/+page.svelte
+++ b/src/routes/login/+page.svelte
@@ -14,7 +14,9 @@
return;
}
try {
- const resp = await fetch("/api/auth/login", {
+ const url =
+ selected == "login" ? "/api/auth/login" : "/api/auth/register";
+ const resp = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -34,12 +36,31 @@
}
}
}
+ let selected = $state("login");
{error}
{/if} @@ -68,12 +89,50 @@ placeholder="••••••••" />