This commit is contained in:
parent
fe9a3f3f25
commit
9d0dbc520b
2 changed files with 10 additions and 12 deletions
1
frontend/src/app.d.ts
vendored
1
frontend/src/app.d.ts
vendored
|
@ -4,7 +4,6 @@ declare global {
|
||||||
namespace App {
|
namespace App {
|
||||||
export interface Error {
|
export interface Error {
|
||||||
message: string;
|
message: string;
|
||||||
errorId: string;
|
|
||||||
}
|
}
|
||||||
// interface Locals {}
|
// interface Locals {}
|
||||||
// interface PageData {}
|
// interface PageData {}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import { error } from '@sveltejs/kit';
|
import { error } from '@sveltejs/kit';
|
||||||
import { PUBLIC_BACKEND_URL } from '$env/static/public';
|
import { PUBLIC_BACKEND_URL } from '$env/static/public';
|
||||||
|
|
||||||
|
@ -10,7 +9,7 @@ export async function load({ fetch }) {
|
||||||
const response = await fetch(`${API_URL}/route-categories`);
|
const response = await fetch(`${API_URL}/route-categories`);
|
||||||
categories = await response.json();
|
categories = await response.json();
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
error(404, "API Not Found");
|
error(404, { message: 'API Not Found'});
|
||||||
}
|
}
|
||||||
|
|
||||||
return { categories };
|
return { categories };
|
||||||
|
|
Loading…
Reference in a new issue