aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 23:17:25 -0800
committerAdam Soltys <[email protected]>2026-03-04 23:17:25 -0800
commit74d8a1dcf9820bad2426feb15bc35dc417d8c454 (patch)
tree4f634d507646db0041da062ee87010d1c1d55b99 /src/routes
parent80687889b2e04b73ca47b407e3eef7f7f543b74f (diff)
downloadcoinos-ui-74d8a1dcf9820bad2426feb15bc35dc417d8c454.tar.gz
coinos-ui-74d8a1dcf9820bad2426feb15bc35dc417d8c454.zip
pass origin
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/ecash/post/+server.ts11
-rw-r--r--src/routes/amber/[id]/[pubkey]/+server.ts6
-rw-r--r--src/routes/passkey/[...path]/+server.ts25
3 files changed, 0 insertions, 42 deletions
diff --git a/src/routes/(app)/ecash/post/+server.ts b/src/routes/(app)/ecash/post/+server.ts
deleted file mode 100644
index 371582bc..00000000
--- a/src/routes/(app)/ecash/post/+server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { json } from "@sveltejs/kit";
-
-export async function POST({ fetch, request }) {
- const { target, payload } = await request.json();
- const res = await fetch(target, {
- method: "POST",
- body: JSON.stringify(payload),
- headers: { "Content-Type": "application/json" },
- });
- return json(res);
-}
diff --git a/src/routes/amber/[id]/[pubkey]/+server.ts b/src/routes/amber/[id]/[pubkey]/+server.ts
deleted file mode 100644
index e0c67145..00000000
--- a/src/routes/amber/[id]/[pubkey]/+server.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { json } from "@sveltejs/kit";
-
-export async function GET({ params }) {
- console.log(params);
- return json({});
-}
diff --git a/src/routes/passkey/[...path]/+server.ts b/src/routes/passkey/[...path]/+server.ts
deleted file mode 100644
index 0c2154d2..00000000
--- a/src/routes/passkey/[...path]/+server.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { PUBLIC_COINOS_URL as base } from "$env/static/public";
-import { auth } from "$lib/utils";
-
-export async function POST({ cookies, fetch, params, request, url }) {
- const { path } = params;
- const headers: Record<string, string> = { "Content-Type": "application/json" };
-
- // Use Authorization header from request if present, otherwise fall back to cookie
- const authHeader = request.headers.get("authorization");
- if (authHeader) {
- headers.authorization = authHeader;
- } else {
- const token = cookies.get("token");
- if (token) Object.assign(headers, auth(cookies));
- }
-
- const body = await request.json();
- body.origin = url.origin;
-
- return fetch(`${base}/passkey/${path}`, {
- method: "POST",
- body: JSON.stringify(body),
- headers,
- });
-}