kramp's picture
kramp HF Staff
Improve opening a model from an URL (#1979)
a2feefd unverified
raw
history blame
301 Bytes
import { base } from "$app/paths";
export async function load({ params, parent, fetch }) {
await fetch(`${base}/api/v2/models/${params.model}/subscribe`, {
method: "POST",
});
return {
settings: await parent().then((data) => ({
...data.settings,
activeModel: params.model,
})),
};
}