aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
committerAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
commitba579c4f801be258128294e7cb1f4d2e518e37ca (patch)
tree2ffbee38d5d82d06580a68ffddd798c1930d6ded /src/routes/(static)
parente39b182ac4c2134157eca3f4cc7c8c7dfd389484 (diff)
downloadcoinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.tar.gz
coinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.zip
fix api calls
Diffstat (limited to 'src/routes/(static)')
-rw-r--r--src/routes/(static)/register/auth/+page.svelte11
-rw-r--r--src/routes/(static)/support/+page.svelte4
2 files changed, 4 insertions, 11 deletions
diff --git a/src/routes/(static)/register/auth/+page.svelte b/src/routes/(static)/register/auth/+page.svelte
index c45d63f6..0aeee6de 100644
--- a/src/routes/(static)/register/auth/+page.svelte
+++ b/src/routes/(static)/register/auth/+page.svelte
@@ -174,7 +174,7 @@
console.log("Nostr key derivation failed", e);
}
- await post("/api/user", nostrPubkey ? { encryptedKeys, pubkey: nostrPubkey } : { encryptedKeys });
+ await post("/user", nostrPubkey ? { encryptedKeys, pubkey: nostrPubkey } : { encryptedKeys });
} catch (e) {
console.log("Canonical key generation failed", e);
}
@@ -269,14 +269,7 @@
// Clean up the account created by passkeyCreate if passkey registration failed
if (passkeyToken) {
try {
- await fetch("/api/user/delete", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- authorization: `Bearer ${passkeyToken}`,
- },
- body: JSON.stringify({}),
- });
+ await post("/user/delete", {}, { authorization: `Bearer ${passkeyToken}` });
} catch {}
}
if (e.name !== "NotAllowedError") {
diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte
index 6af80f86..a7316129 100644
--- a/src/routes/(static)/support/+page.svelte
+++ b/src/routes/(static)/support/+page.svelte
@@ -31,7 +31,7 @@
let submit = (e: any) => {
e.preventDefault();
if (isTor) {
- post("/api/email", {
+ post("/email", {
username: user?.username || `${username} (unverified)`,
email,
message,
@@ -43,7 +43,7 @@
}
grecaptcha.ready(() => {
grecaptcha.execute(recaptchaSiteKey, { action: "submit" }).then((token) =>
- post("/api/email", {
+ post("/email", {
username: user?.username || `${username} (unverified)`,
email,
message,