Skip to contentOpen History to see the last commit
+server.ts
7 lines260 Bytes
1import { json } from '@sveltejs/kit' 2import type { RequestHandler } from './$types' 3import { getContacts } from '$lib/server/contacts' 5export const GET: RequestHandler = async ({ url }) => { 6 return json(await getContacts(url.searchParams.get('q') ?? ''))