mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 02:56:39 +07:00
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.
20 lines
651 B
Python
20 lines
651 B
Python
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)
|