- 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.
11 lines
291 B
TypeScript
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);
|
|
}
|