feat(finance): Phase 5 — Rules Engine
Add rules engine with CRUD API, condition/action evaluation, and apply-all endpoint. UI: rule builder form with field/operator/value conditions, tag multi-select, apply button with result stats.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getCurrentUser } from "@/lib/auth";
|
||||
import { getStatements } from "@/lib/queries";
|
||||
|
||||
export async function GET() {
|
||||
const statements = await getStatements();
|
||||
export async function GET(req: NextRequest) {
|
||||
const user = await getCurrentUser(req);
|
||||
if (!user) return NextResponse.json({ error: "Unauthorized" }, { status: 403 });
|
||||
const statements = await getStatements(user.id);
|
||||
return NextResponse.json(statements);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user