app/routes/blog.tags.$tag.rss[.xml].ts
12 lines and 1 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| loader | 9 to 14 | 2 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
Imports
It imports app/db/index.ts, app/lib/context.ts, app/lib/feed-response.ts. No module of this repo imports it.
Source
import { data } from "react-router";
import { getBlogTag } from "~/db";
import { getEnv } from "~/lib/context";
import { feedResponse, tagFeed } from "~/lib/feed-response";
import type { Route } from "./+types/blog.tags.$tag.rss[.xml]";
/** 404 on an unknown tag: a feed and its page must agree about whether a tag exists. */
export async function loader({ params, context }: Route.LoaderArgs) {
const env = getEnv(context);
const tag = await getBlogTag(env, params.tag);
if (!tag) throw data("Not found", { status: 404 });
return feedResponse(env, "rss", tagFeed(tag));
}