refactor: Use `FreshContext` instead of deprecated `HandlerContext`
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
This commit is contained in:
parent
353466992f
commit
dda88eb75c
|
|
@ -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<Response> => {
|
||||
export const handler = async (_req: Request, ctx: FreshContext): Promise<Response> => {
|
||||
const seriesId = ctx.params.seriesId;
|
||||
const feedContent = await buildFeed(seriesId);
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Response> => {
|
||||
export const handler = async (_req: Request, ctx: FreshContext): Promise<Response> => {
|
||||
const seriesId = ctx.params.seriesId;
|
||||
const episodeId = ctx.params.episodeId;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue