Upgrade Fresh and add a bunch of small QOL improvements #16

Merged
timharek merged 21 commits from chore-upgrade-fresh into main 2024-03-24 12:41:18 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit dda88eb75c - Show all commits

View File

@ -1,5 +1,5 @@
import { Episode, nrkRadio } from "../../../lib/nrk.ts"; 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 { declaration, serialize, tag } from "https://raw.githubusercontent.com/olaven/serialize-xml/v0.4.0/mod.ts";
import { getHostName } from "../../../utils.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 seriesId = ctx.params.seriesId;
const feedContent = await buildFeed(seriesId); const feedContent = await buildFeed(seriesId);

View File

@ -1,3 +1,4 @@
import { FreshContext } from "$fresh/server.ts";
import { parse, toSeconds } from "https://esm.sh/iso8601-duration@2.1.1"; import { parse, toSeconds } from "https://esm.sh/iso8601-duration@2.1.1";
import { nrkRadio, OriginalEpisode } from "../../../../../lib/nrk.ts"; 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 seriesId = ctx.params.seriesId;
const episodeId = ctx.params.episodeId; const episodeId = ctx.params.episodeId;