klg-asutk-app/app/api/knowledge/search/route.ts
Yuriy 0150aba4f5 Consolidation: KLG ASUTK + PAPA integration
- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites)
- Remove localhost refs: openapi, inbox page
- Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI
- Add stub routes: knowledge/insights, recommendations, search, log-error
- Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests
- Fix inbox-server: ORDER BY created_at, package.json
- Remove redundant app/api/inbox/files route (rewrites handle it)
- knowledge/ in gitignore (large PDFs)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 17:18:31 +03:00

21 lines
618 B
TypeScript

import { NextResponse } from 'next/server';
export const dynamic = 'force-dynamic';
export async function POST(req: Request) {
try {
const body = await req.json();
return NextResponse.json({
results: [],
query: body.query || '',
total: 0,
message: 'Search stub — connect to search service for real data'
});
} catch {
return NextResponse.json({ results: [], total: 0 });
}
}
export async function GET(req: Request) {
const { searchParams } = new URL(req.url);
const q = searchParams.get('q') || '';
return NextResponse.json({ results: [], query: q, total: 0 });
}