Files
the-bias-times/src/app/api/admin/sources/route.ts
hermes 8daac94f5a feat: admin article management, sources, settings, rules, and scheduler
- Add article list, editor, and deletion UI.
- Add source management with bias/credibility/active toggles.
- Add encrypted API key CRUD UI.
- Add automated search rules with query, sources, schedule presets,
  and per-rule AI model override.
- Implement node-cron scheduler and instrumentation hook.
- Add admin settings including password change and quota reference.
2026-06-17 04:32:29 +00:00

11 lines
291 B
TypeScript

import { NextResponse } from 'next/server';
import { prisma } from '@/lib/db';
export async function GET() {
const sources = await prisma.source.findMany({
orderBy: { name: 'asc' },
include: { _count: { select: { articles: true } } },
});
return NextResponse.json(sources);
}