From 42cc753e86a3b7c5020206dda68bbb81bf15da2b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 29 Nov 2024 23:32:08 -0800 Subject: load more contacts --- src/routes/(app)/contacts/+server.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/routes/(app)/contacts/+server.ts (limited to 'src/routes/(app)/contacts') diff --git a/src/routes/(app)/contacts/+server.ts b/src/routes/(app)/contacts/+server.ts new file mode 100644 index 00000000..e448bda2 --- /dev/null +++ b/src/routes/(app)/contacts/+server.ts @@ -0,0 +1,12 @@ +import { auth, get } from "$lib/utils"; +import { json } from "@sveltejs/kit"; + +export async function GET({ cookies }) { + try { + const contacts = await get("/contacts", auth(cookies)); + return json(contacts); + } catch (e) { + console.log(e); + return json({}); + } +} -- cgit v1.2.3