MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getResearchArticleCount

Function getResearchArticleCount

server/src/routes/latest.ts:30–40  ·  view source on GitHub ↗

* Get the count of published research perspectives from the Editorial working group.

()

Source from the content-addressed store, hash-verified

28 * Get the count of published research perspectives from the Editorial working group.
29 */
30async function getResearchArticleCount(): Promise<number> {
31 const result = await query<{ count: string }>(
32 `SELECT COUNT(*) as count
33 FROM perspectives p
34 JOIN working_groups wg ON p.working_group_id = wg.id
35 WHERE p.status = 'published'
36 AND wg.slug = 'editorial'
37 AND (p.source_type IS NULL OR p.source_type NOT IN ('rss', 'email'))`
38 );
39 return parseInt(result.rows[0]?.count || "0", 10);
40}
41
42// Article type for API responses
43interface LatestArticle {

Callers 1

createLatestRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected