feat: monthly budgets per category with history
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bfaa38510b
commit
0b9c6a11d3
6 files changed
+316
No files matched your search
@@ -0,0 +1,12 @@
|
||||
"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;
|
||||
}
|
||||
Reference in new issue
Block a user