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 6 additions and 12 deletions
Showing only changes of commit 353466992f - Show all commits

View File

@ -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<Response> => {
const seriesId = _ctx.params.seriesId;
export const handler = async (_req: Request, ctx: HandlerContext): Promise<Response> => {
const seriesId = ctx.params.seriesId;
const feedContent = await buildFeed(seriesId);
return new Response(feedContent, {

View File

@ -7,12 +7,10 @@ function toChapters(episode: OriginalEpisode) {
startTime: toSeconds(parse(indexPoint.startPoint)),
}));
}
export const handler = async (
req: Request,
_ctx: HandlerContext,
): Promise<Response> => {
const seriesId = _ctx.params.seriesId;
const episodeId = _ctx.params.episodeId;
export const handler = async (_req: Request, ctx: HandlerContext): Promise<Response> => {
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);