diff --git a/app/api/route.ts b/app/api/route.ts index b246168..2b199f7 100644 --- a/app/api/route.ts +++ b/app/api/route.ts @@ -2,16 +2,14 @@ import { NextResponse } from "next/server"; import { Calculation, calculationSchema } from "../schemas/calculationSchema"; import * as calculationService from "../services/calculationService"; - export async function POST(req: Request) { try { // Parse and validate user input const data = await req.json(); //const input: Calculation = calculationSchema.parse(data); - const householdData = await calculationService.getHouseholdData(input); + const householdData = await calculationService.getHouseholdData(data); return NextResponse.json(householdData); - } catch (err) { console.log("ERROR: API - ", (err as Error).message); const response = { error: (err as Error).message };