"use server"; import { revalidatePath } from "next/cache"; import { requireUser } from "@/server/auth"; import { setBudget } from "@/server/services/budgets"; export async function setBudgetAction(categoryId: string, amount: string, fromMonth: string) { await requireUser(); const result = await setBudget(categoryId, amount, fromMonth); if (result.ok) revalidatePath("/", "layout"); return result; }