Skip to content

Commit

Permalink
fixed wrong variable being passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Granello committed Aug 19, 2024
1 parent a1ad78d commit 52f707a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/api/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 52f707a

Please sign in to comment.