SPB Git

spb/websensor

Public

web: news channel allowed in /category, sitemap and API docs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed (Sep 8, 2026) parent a5a20fe Browse files

3 changed files +3 −3

modified apps/web/src/app/api/page.tsx +1 −1
@@ -94,7 +94,7 @@ export default function ApiPage() {
94 <li>events:global (default)</li> 94 <li>events:global (default)</li>
95 <li>events:breaking (importance ≥ 80)</li> 95 <li>events:breaking (importance ≥ 80)</li>
96 <li>events:silent</li> 96 <li>events:silent</li>
97− <li>events:ai · cyber · finance · health · government · science · products · infrastructure</li> 97+ <li>events:ai · cyber · finance · health · government · science · products · infrastructure · news</li>
98 <li>entity:{"{entity_id}"}</li> 98 <li>entity:{"{entity_id}"}</li>
99 <li>source:{"{source_id}"}</li> 99 <li>source:{"{source_id}"}</li>
100 <li>type:{"{event_type}"}</li> 100 <li>type:{"{event_type}"}</li>
modified apps/web/src/app/category/[channel]/page.tsx +1 −1
@@ -7,7 +7,7 @@ import { CHANNELS } from "@/lib/format";
7 7
8 export const dynamic = "force-dynamic"; 8 export const dynamic = "force-dynamic";
9 9
10−const ALLOWED = new Set(["ai", "cyber", "finance", "health", "government", "science", "products", "infrastructure", "cloud", "developer", "consumer-tech", "semiconductors", "pharma", "statistics", "space", "automotive", "commerce", "payments", "crypto", "enterprise", "internet", "standards", "technology"]); 10+const ALLOWED = new Set(["ai", "cyber", "finance", "health", "government", "science", "products", "infrastructure", "cloud", "developer", "consumer-tech", "semiconductors", "pharma", "statistics", "space", "automotive", "commerce", "payments", "crypto", "enterprise", "internet", "standards", "technology", "news", "media", "politics"]);
11 11
12 export async function generateMetadata({ params }: { params: Promise<{ channel: string }> }): Promise<Metadata> { 12 export async function generateMetadata({ params }: { params: Promise<{ channel: string }> }): Promise<Metadata> {
13 const { channel } = await params; 13 const { channel } = await params;
modified apps/web/src/app/sitemap.ts +1 −1
@@ -5,7 +5,7 @@ export const dynamic = "force-dynamic";
5 5
6 export default async function sitemap(): Promise<MetadataRoute.Sitemap> { 6 export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
7 const now = new Date(); 7 const now = new Date();
8− const statics: MetadataRoute.Sitemap = ["", "/breaking", "/explore", "/sources", "/entities", "/silent", "/api", "/health", "/bot", "/watchlists", "/alerts", ...["ai", "cyber", "finance", "health", "government", "science", "products", "infrastructure"].map((c) => `/category/${c}`)].map((p) => ({ url: `${SITE_URL}${p}`, lastModified: now, changeFrequency: p === "" ? "always" : "hourly", priority: p === "" ? 1 : 0.7 })); 8+ const statics: MetadataRoute.Sitemap = ["", "/breaking", "/explore", "/sources", "/entities", "/silent", "/api", "/health", "/bot", "/watchlists", "/alerts", ...["ai", "cyber", "finance", "health", "government", "science", "products", "infrastructure", "news"].map((c) => `/category/${c}`)].map((p) => ({ url: `${SITE_URL}${p}`, lastModified: now, changeFrequency: p === "" ? "always" : "hourly", priority: p === "" ? 1 : 0.7 }));
9 const [events, sources, entities] = await Promise.all([api.events({ limit: 200 }), api.sources(), api.entities({ limit: 500 })]); 9 const [events, sources, entities] = await Promise.all([api.events({ limit: 200 }), api.sources(), api.entities({ limit: 500 })]);
10 const more = await (events.nextCursor ? api.events({ limit: 200, cursor: events.nextCursor }) : Promise.resolve({ items: [], nextCursor: null })); 10 const more = await (events.nextCursor ? api.events({ limit: 200, cursor: events.nextCursor }) : Promise.resolve({ items: [], nextCursor: null }));
11 const third = await (more.nextCursor ? api.events({ limit: 100, cursor: more.nextCursor }) : Promise.resolve({ items: [], nextCursor: null })); 11 const third = await (more.nextCursor ? api.events({ limit: 100, cursor: more.nextCursor }) : Promise.resolve({ items: [], nextCursor: null }));
12 12
Menu

Theme