From 60c22c5350b1f2a2c9264028d2c8a5f83f617ebf Mon Sep 17 00:00:00 2001 From: qowevisa Date: Fri, 8 Nov 2024 19:43:56 +0200 Subject: [PATCH] Change +page.server.js to +page.server.ts for test2 route --- src/routes/test2/+page.server.js | 9 --------- src/routes/test2/+page.server.ts | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 src/routes/test2/+page.server.js create mode 100644 src/routes/test2/+page.server.ts diff --git a/src/routes/test2/+page.server.js b/src/routes/test2/+page.server.js deleted file mode 100644 index f368e5d..0000000 --- a/src/routes/test2/+page.server.js +++ /dev/null @@ -1,9 +0,0 @@ -export async function load({ fetch }) { - const response = await fetch("https://api.fin.qowevisa.click/api/authping", { - credentials: "include", - }); - - return { - message: await response.json() - }; -} diff --git a/src/routes/test2/+page.server.ts b/src/routes/test2/+page.server.ts new file mode 100644 index 0000000..207aecb --- /dev/null +++ b/src/routes/test2/+page.server.ts @@ -0,0 +1,9 @@ +import type { PageServerLoad } from "./$types"; + +export const load: PageServerLoad = async ({ fetch }) => { + const response = await fetch("https://api.fin.qowevisa.click/api/authping"); + + return { + message: await response.json() + }; +}