Spaces:
Build error
Build error
File size: 349 Bytes
992a8de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import { base } from "$app/paths";
import { redirect } from "@sveltejs/kit";
export async function load({ parent, params }) {
const data = await parent();
const assistant = data.settings.assistants.find((id) => id === params.assistantId);
if (!assistant) {
throw redirect(302, `${base}/assistant/${params.assistantId}`);
}
return data;
}
|