Upgrade Fresh and add a bunch of small QOL improvements #16
|
|
@ -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, {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue