Skip to the content

Capsid menu

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

The functions of blog.tags.$tag.rss[.xml].ts
FunctionLinesComplexityCoveredCRAPMutation
loader9 to 142No data: no coverage report in this mapNo data: no coverage report in this mapNo 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));
}