Skip to content

g1t/apps/web/app/routes/repo/about-json.ts

15 lines679 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Merge branch 'main' into worktree-agent-a69aeabc4b0deeb971/**
2 * The Files page's About as JSON, asked for again by the panel while the
3 * default branch is first being read (components/repo-about.tsx).
4 */
5import { data } from "react-router";
6
7import type { Route } from "./+types/about-json";
8import { repos } from "../../lib/services.server";
9import { getViewer } from "../../lib/session.server";
10
11export async function loader({ params, context }: Route.LoaderArgs) {
12 const found = await repos.about({ namespace: params.owner, name: params.repo }, getViewer(context));
13 if (!found.ok) throw data({ error: found.error.message }, { status: 404 });
14 return Response.json(found.value, { headers: { "cache-control": "no-store" } });
15}

This file's history is long; its oldest lines are credited to the oldest commit read.