Skip to content

Commit

Permalink
fix: prerendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen committed Feb 6, 2025
1 parent 7bca7b9 commit aa9e299
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions front/embed/src/routes/station/[station]/data.json/+server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { error, json, type RequestHandler } from "@sveltejs/kit";
import { Client } from "../../../../../../packages/client/src";
import { env } from "$env/dynamic/private";
const base_url = env.EMBED_API_BASE_URL;
if(base_url == null) throw new Error("EMBED_API_BASE_URL is not set");
const client = new Client(base_url);

export const GET: RequestHandler = async ({ params }) => {
const base_url = env.EMBED_API_BASE_URL;
if(base_url == null) throw new Error("EMBED_API_BASE_URL is not set");
const client = new Client(base_url);

const station = await client.embed.get_station(null, null, null, params.station!).catch(e => {
error(Number(e?.status) || 500, String(e?.message))
})
Expand Down

0 comments on commit aa9e299

Please sign in to comment.