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); }