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.js | 10 ---------- src/routes/(app)/withdraw/+server.ts | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 src/routes/(app)/withdraw/+server.js create mode 100644 src/routes/(app)/withdraw/+server.ts (limited to 'src/routes/(app)/withdraw') diff --git a/src/routes/(app)/withdraw/+server.js b/src/routes/(app)/withdraw/+server.js deleted file mode 100644 index a75a72f8..00000000 --- a/src/routes/(app)/withdraw/+server.js +++ /dev/null @@ -1,10 +0,0 @@ -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" }, - }); -} 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