Spaces:
Running
Running
File size: 328 Bytes
e99e7c2 1095e14 4a66e10 06feee8 e99e7c2 |
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 model = data.models.find((m: { id: string }) => m.id === params.model);
if (!model || model.unlisted) {
redirect(302, `${base}/settings`);
}
return data;
}
|