tblaisaacliao's picture
support updating evaluation prompt in UI
cab7b1f
import { NextResponse } from 'next/server';
import { getPromptService } from '@/lib/services/prompt-service';
import { withAdminAuth } from '@/lib/auth';
/**
* GET /api/admin/evaluation-prompts
* List all evaluation prompts
* Requires admin authentication
*/
export const GET = withAdminAuth(async () => {
const promptService = getPromptService();
const prompts = await promptService.listEvaluationPrompts();
return NextResponse.json({
prompts,
total: prompts.length,
});
});