aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/contacts/+server.ts
blob: 2bc5d28edda35cf00dcc2e431e49aacaf3bf71e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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({});
  }
}