mirror of
https://github.com/migatu/astrololo.git
synced 2026-07-17 15:12:09 +00:00
Merge branch 'master' into feat/search-integration
This commit is contained in:
@@ -37,6 +37,7 @@ class PositionsRequest(BaseModel):
|
||||
lat: float = 0.0
|
||||
lon: float = 0.0
|
||||
objects: list[str] | None = None
|
||||
house_system: str = "whole_sign" # whole_sign | equal | porphyry
|
||||
|
||||
|
||||
@app.post("/api/query", response_model=QueryResponse)
|
||||
@@ -49,13 +50,13 @@ def query(req: QueryRequest) -> QueryResponse:
|
||||
|
||||
@app.post("/chart/positions")
|
||||
def chart_positions(req: PositionsRequest) -> dict:
|
||||
"""Pozycje obiektów dla danego momentu (LOG-01), liczone aktywnym silnikiem."""
|
||||
"""Pełny horoskop: pozycje (LOG-01) + osie i domy (LOG-05), aktywnym silnikiem."""
|
||||
from app.engine.chart import build_chart
|
||||
from app.engine.models import ChartMoment
|
||||
|
||||
engine = get_engine()
|
||||
moment = ChartMoment(when_utc=req.when_utc, lat=req.lat, lon=req.lon)
|
||||
positions = engine.positions(moment, req.objects)
|
||||
return {"engine": engine.name, "positions": [p.as_dict() for p in positions]}
|
||||
return build_chart(engine, moment, req.house_system)
|
||||
|
||||
|
||||
@app.post("/chart/compare")
|
||||
|
||||
Reference in New Issue
Block a user