9 lines
313 B
TypeScript
9 lines
313 B
TypeScript
import { getPostingWithCompanyUser } from '$lib/db/index.server';
|
|
import { error, json } from '@sveltejs/kit';
|
|
|
|
export async function GET({ url }) {
|
|
const id = url.searchParams.get('id');
|
|
if (!id) return new Response(error(400, 'No id provided'));
|
|
return json(await getPostingWithCompanyUser(parseInt(id)));
|
|
}
|