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:
19
backend/app/api/routes/cash_flow.py
Normal file
19
backend/app/api/routes/cash_flow.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from datetime import date as date_
|
||||
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.api.deps import get_session
|
||||
from app.schemas.cash_flow import CashFlowResponse
|
||||
from app.services.cash_flow_service import get_cash_flow
|
||||
|
||||
router = APIRouter(prefix="/cash-flow", tags=["cash-flow"])
|
||||
|
||||
|
||||
@router.get("", response_model=CashFlowResponse)
|
||||
async def read_cash_flow(
|
||||
start_date: date_ | None = Query(default=None),
|
||||
end_date: date_ | None = Query(default=None),
|
||||
session: AsyncSession = Depends(get_session),
|
||||
) -> CashFlowResponse:
|
||||
return await get_cash_flow(session, start_date, end_date)
|
||||
Reference in New Issue
Block a user