mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 19:16:40 +07:00
Initial public release
Aurum — a self-hosted personal finance operating system: cash flow, net worth tracking, budgets, goals, recurring payments, reports, proactive alerts, and a compound-interest returns calculator, all bilingual (RU/EN) and mobile-first. Ships as a three-container Docker Compose stack (Postgres + FastAPI + nginx-served React frontend). See README.md for setup and CONTRIBUTING.md for development.
This commit is contained in:
22
frontend/src/api/goals.ts
Normal file
22
frontend/src/api/goals.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { api } from "@/api/client";
|
||||
import type { Goal, GoalContributionInput, GoalInput } from "@/types";
|
||||
|
||||
export function fetchGoals() {
|
||||
return api.get<Goal[]>("/goals");
|
||||
}
|
||||
|
||||
export function createGoal(input: GoalInput) {
|
||||
return api.post<Goal>("/goals", input);
|
||||
}
|
||||
|
||||
export function updateGoal(id: number, input: Partial<GoalInput>) {
|
||||
return api.patch<Goal>(`/goals/${id}`, input);
|
||||
}
|
||||
|
||||
export function deleteGoal(id: number) {
|
||||
return api.delete<void>(`/goals/${id}`);
|
||||
}
|
||||
|
||||
export function addGoalContribution(id: number, input: GoalContributionInput) {
|
||||
return api.post<Goal>(`/goals/${id}/contributions`, input);
|
||||
}
|
||||
Reference in New Issue
Block a user