From df71664f20312e81134ee90ad561f55d3020ee0a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 30 Aug 2024 20:04:29 -0700 Subject: typescript --- src/routes/(app)/withdraw/+server.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/routes/(app)/withdraw/+server.ts (limited to 'src/routes/(app)/withdraw/+server.ts') diff --git a/src/routes/(app)/withdraw/+server.ts b/src/routes/(app)/withdraw/+server.ts new file mode 100644 index 00000000..a75a72f8 --- /dev/null +++ b/src/routes/(app)/withdraw/+server.ts @@ -0,0 +1,10 @@ +import { auth, post } from "$lib/utils"; + +export async function POST({ cookies, request }) { + let body = await request.json(); + await post("/payments", body, auth(cookies)); + + return new Response(JSON.stringify("ok"), { + headers: { "content-type": "application/json" }, + }); +} -- cgit v1.2.3