Skip to content

Commit 9cfe8d3

Browse files
bokelleyclaude
andauthored
fix: filter RSS from perspectives API, add Stories to nav (#1660)
* fix: filter RSS articles from perspectives API and add Stories to noscript nav The /api/perspectives endpoint was returning RSS feed articles alongside authored content because it didn't filter on source_type. The frontend passes ?authored=true but the backend ignored it. Now respects that param to exclude RSS articles. Also adds Stories link to the noscript fallback nav. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: add empty changeset for CI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9b5dc42 commit 9cfe8d3

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

.changeset/modern-swans-hide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

server/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<div id="adcp-nav">
3737
<noscript>
3838
<nav>
39+
<a href="/stories">Stories</a>
3940
<a href="/certification">Academy</a>
4041
<a href="/chat">Ask Addie</a>
4142
<a href="/registry">Registry</a>

server/src/http.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4807,10 +4807,12 @@ Disallow: /api/admin/
48074807
// Public Perspectives API Routes
48084808
// ========================================
48094809

4810-
// GET /api/perspectives - List published perspectives (excludes working group posts)
4810+
// GET /api/perspectives - List published perspectives (excludes working group posts and RSS)
4811+
// ?authored=true filters to only authored content (excludes RSS feed articles)
48114812
this.app.get('/api/perspectives', async (req, res) => {
48124813
try {
48134814
const pool = getPool();
4815+
const authored = req.query.authored === 'true';
48144816
const result = await pool.query(
48154817
`SELECT
48164818
id, slug, content_type, title, subtitle, category, excerpt,
@@ -4819,6 +4821,7 @@ Disallow: /api/admin/
48194821
published_at, display_order, tags, like_count
48204822
FROM perspectives
48214823
WHERE status = 'published' AND working_group_id IS NULL
4824+
${authored ? "AND (source_type IS NULL OR source_type != 'rss')" : ''}
48224825
ORDER BY published_at DESC NULLS LAST`
48234826
);
48244827

0 commit comments

Comments
 (0)