diff --git a/routes/api/feeds/[seriesId].ts b/routes/api/feeds/[seriesId].ts index 731a2b2..703a581 100644 --- a/routes/api/feeds/[seriesId].ts +++ b/routes/api/feeds/[seriesId].ts @@ -1,6 +1,5 @@ import { Episode, nrkRadio } from "../../../lib/nrk.ts"; import { HandlerContext } 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"; @@ -87,11 +86,8 @@ async function buildFeed(seriesId: string) { ); } -export const handler = async ( - req: Request, - _ctx: HandlerContext, -): Promise => { - const seriesId = _ctx.params.seriesId; +export const handler = async (_req: Request, ctx: HandlerContext): Promise => { + const seriesId = ctx.params.seriesId; const feedContent = await buildFeed(seriesId); return new Response(feedContent, { diff --git a/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts b/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts index 55b4879..7a2b26d 100644 --- a/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts +++ b/routes/api/feeds/[seriesId]/[episodeId]/chapters.ts @@ -7,12 +7,10 @@ function toChapters(episode: OriginalEpisode) { startTime: toSeconds(parse(indexPoint.startPoint)), })); } -export const handler = async ( - req: Request, - _ctx: HandlerContext, -): Promise => { - const seriesId = _ctx.params.seriesId; - const episodeId = _ctx.params.episodeId; + +export const handler = async (_req: Request, ctx: HandlerContext): Promise => { + const seriesId = ctx.params.seriesId; + const episodeId = ctx.params.episodeId; console.log("going to get ep for ", episodeId); const episode = await nrkRadio.getEpisode(seriesId, episodeId);