Files
FBLA25/src/routes/api/posting/+server.ts
T
drake 77655c779d
ci / docker_image (push) Successful in 1m37s
ci / deploy (push) Successful in 16s
import cleanup
2025-03-29 18:13:02 -05:00

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)));
}