Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/app/api/websites/route.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/app/api/websites/route.ts |
| Original SHA-256 | 5bf3943b36d7745ca91a404decddb9cf632c18401a56c5f872c34dfb3fb2005e |
| Git blob SHA | 02e3a7e2bd2575e664ba7e008b858e723d96ae0c |
| Reading-copy SHA-256 | 5bf3943b36d7745ca91a404decddb9cf632c18401a56c5f872c34dfb3fb2005e |
Recovered source transcript
Download complete source text ↓17 lines · 0.5 KB
import { logger } from '@thedaviddias/logging'
import { NextResponse } from 'next/server'
import { getWebsites } from '@/lib/content-loader'
/**
* Handles GET requests to fetch all websites
*/
export async function GET() {
try {
const websites = await getWebsites()
return NextResponse.json(websites)
} catch (error) {
logger.error('Error fetching websites', { data: error, tags: { api: 'websites' } })
return NextResponse.json({ error: 'Failed to fetch websites' }, { status: 500 })
}
}