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.
This commit is contained in:
10
src/app/api/admin/sources/route.ts
Normal file
10
src/app/api/admin/sources/route.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user