Files
personal-admin-2026/apps/backend/src/modules/expenses/handlers/getMonthlyPayedTotal.ts

10 lines
428 B
TypeScript

import type { Context } from "hono";
import { getMonthlyPayedTotal } from "../expenses.service";
export async function getMonthlyPayedTotalHandler(c: Context) {
const year = parseInt(c.req.query("year") ?? String(new Date().getUTCFullYear()), 10);
const month = parseInt(c.req.query("month") ?? String(new Date().getUTCMonth() + 1), 10);
const result = await getMonthlyPayedTotal(year, month);
return c.json(result);
}