diff --git a/routes/api/feeds/[seriesId].ts b/routes/api/feeds/[seriesId].ts index 703a581..588cbf3 100644 --- a/routes/api/feeds/[seriesId].ts +++ b/routes/api/feeds/[seriesId].ts @@ -1,5 +1,5 @@ import { Episode, nrkRadio } from "../../../lib/nrk.ts"; -import { HandlerContext } from "$fresh/server.ts"; +import { FreshContext } from "$fresh/server.ts"; import { declaration, serialize, tag } from "https://raw.githubusercontent.com/olaven/serialize-xml/v0.4.0/mod.ts"; import { getHostName } from "../../../utils.ts"; @@ -86,7 +86,7 @@ async function buildFeed(seriesId: string) { ); } -export const handler = async (_req: Request, ctx: HandlerContext): Promise => { +export const handler = async (_req: Request, ctx: FreshContext): Promise => { const seriesId = ctx.params.seriesId; const feedContent = await buildFeed(seriesId); diff --git a/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts b/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts index 7a2b26d..3ec715c 100644 --- a/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts +++ b/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts @@ -1,3 +1,4 @@ +import { FreshContext } from "$fresh/server.ts"; import { parse, toSeconds } from "https://esm.sh/iso8601-duration@2.1.1"; import { nrkRadio, OriginalEpisode } from "../../../../../lib/nrk.ts"; @@ -8,7 +9,7 @@ function toChapters(episode: OriginalEpisode) { })); } -export const handler = async (_req: Request, ctx: HandlerContext): Promise => { +export const handler = async (_req: Request, ctx: FreshContext): Promise => { const seriesId = ctx.params.seriesId; const episodeId = ctx.params.episodeId;