ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/app/api/cli/stats/[slug]/route.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/app/api/cli/stats/[slug]/route.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/app/api/cli/stats/[slug]/route.ts
Original SHA-25642730744431637bb3507eb3f831da510bdf55764202c7c7696120f5add9c382a
Git blob SHAea257eb2d9e6071ffcc1f912d4eaedc1758dc2f7
Reading-copy SHA-25642730744431637bb3507eb3f831da510bdf55764202c7c7696120f5add9c382a

Original source ↗

Recovered source transcript

import { type NextRequest, NextResponse } from 'next/server' import { getRawClient } from '@/lib/redis' /** * GET /api/cli/stats/[slug] * * Returns the total install count for a CLI skill from Redis. * Falls back to 0 when Redis is unavailable. */ export async function GET( _request: NextRequest, { params }: { params: Promise<{ slug: string }> } ) { const { slug } = await params if (!slug || typeof slug !== 'string') { return NextResponse.json({ error: 'Missing slug' }, { status: 400 }) } const redis = getRawClient() if (!redis) { return NextResponse.json({ count: 0 }) } try { const count = await redis.hget<number>('telemetry:skills:total', slug) return NextResponse.json( { count: count ?? 0 }, { headers: { 'Cache-Control': 'public, s-maxage=300, stale-while-revalidate=600' } } ) } catch { return NextResponse.json({ count: 0 }) } }

Search equations, builds, manuscript text, and recovered sources.