final touches
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { getPosting, getPostingFullData } from '$lib/db/index.server';
|
||||
import { getPosting, 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 getPostingFullData(parseInt(id)));
|
||||
return json(await getPostingWithCompanyUser(parseInt(id)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user