Run npm format

This commit is contained in:
2026-02-05 20:01:54 +00:00
parent 221159433c
commit 4220cdfa5e
18 changed files with 751 additions and 723 deletions

View File

@@ -2,28 +2,28 @@ import type { PageLoad } from '/$types';
import { error } from '@sveltejs/kit';
export const load: PageLoad = async ({ params, fetch }) => {
const { slug } = params;
const { slug } = params;
try {
const res = await fetch(`/mapFiles/json/${slug}.json`);
try {
const res = await fetch(`/mapFiles/json/${slug}.json`);
if (!res.ok) {
throw error(404, {
message: `Route ${slug} not found`
});
}
if (!res.ok) {
throw error(404, {
message: `Route ${slug} not found`
});
}
const rawData = await res.json();
const rawData = await res.json();
return {
route: rawData,
slug: slug,
};
} catch (err) {
console.error(`Error loading map ${slug}: `, err);
return {
route: rawData,
slug: slug
};
} catch (err) {
console.error(`Error loading map ${slug}: `, err);
throw error(500, {
message: `Failed to parse map data for ${slug}`
});
}
};
throw error(500, {
message: `Failed to parse map data for ${slug}`
});
}
};