Showing
5 changed files
with
12 additions
and
7 deletions
| ... | @@ -47,7 +47,7 @@ app = FastAPI( | ... | @@ -47,7 +47,7 @@ app = FastAPI( |
| 47 | ], | 47 | ], |
| 48 | ), | 48 | ), |
| 49 | ], | 49 | ], |
| 50 | - root_path='/api' | 50 | + root_path='/prespuesto/api' |
| 51 | ) | 51 | ) |
| 52 | 52 | ||
| 53 | app.include_router(entity.router_entidad) | 53 | app.include_router(entity.router_entidad) |
| ... | @@ -59,7 +59,7 @@ app.include_router(classifier.router_finfun) | ... | @@ -59,7 +59,7 @@ app.include_router(classifier.router_finfun) |
| 59 | app.include_router(classifier_income.router_rubro) | 59 | app.include_router(classifier_income.router_rubro) |
| 60 | app.include_router(classifier_income.router_organismo) | 60 | app.include_router(classifier_income.router_organismo) |
| 61 | app.include_router(project.router) | 61 | app.include_router(project.router) |
| 62 | -app.include_router(daily.router) | 62 | +# app.include_router(daily.router) |
| 63 | app.include_router(search.router) | 63 | app.include_router(search.router) |
| 64 | app.include_router(private_metrics.router) | 64 | app.include_router(private_metrics.router) |
| 65 | 65 | ... | ... |
| ... | @@ -9,8 +9,9 @@ from presupuestov1.routers._decorators import not_found | ... | @@ -9,8 +9,9 @@ from presupuestov1.routers._decorators import not_found |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | router = APIRouter( | 11 | router = APIRouter( |
| 12 | - prefix='/diario', | 12 | + prefix='/_diario', |
| 13 | tags=['diario'], | 13 | tags=['diario'], |
| 14 | + include_in_schema=False, | ||
| 14 | ) | 15 | ) |
| 15 | 16 | ||
| 16 | 17 | ... | ... |
| ... | @@ -88,7 +88,7 @@ def fetch_da( | ... | @@ -88,7 +88,7 @@ def fetch_da( |
| 88 | da_id: str, | 88 | da_id: str, |
| 89 | db: Session = Depends(model.get_db), | 89 | db: Session = Depends(model.get_db), |
| 90 | ): | 90 | ): |
| 91 | - gastos_ingresos = get_resumen(db, 'entidad_da', ubigeo_id) | 91 | + gastos_ingresos = get_resumen(db, 'entidad_da', da_id) |
| 92 | return gastos_ingresos | 92 | return gastos_ingresos |
| 93 | 93 | ||
| 94 | 94 | ... | ... |
| ... | @@ -75,7 +75,7 @@ def fetch_programa_proyecto_proyectos( | ... | @@ -75,7 +75,7 @@ def fetch_programa_proyecto_proyectos( |
| 75 | def fetch_programa_proyecto_objetos( | 75 | def fetch_programa_proyecto_objetos( |
| 76 | project_id: int, | 76 | project_id: int, |
| 77 | db: Session = Depends(model.get_db), | 77 | db: Session = Depends(model.get_db), |
| 78 | - query: schema.QueryParams = Depends(), | 78 | + query: schema.QueryParamsPaginated = Depends(), |
| 79 | ): | 79 | ): |
| 80 | return get_clasificadores(db, 'objeto', project_id, query) | 80 | return get_clasificadores(db, 'objeto', project_id, query) |
| 81 | 81 | ||
| ... | @@ -84,7 +84,7 @@ def fetch_programa_proyecto_objetos( | ... | @@ -84,7 +84,7 @@ def fetch_programa_proyecto_objetos( |
| 84 | def fetch_programa_proyecto_finfuns( | 84 | def fetch_programa_proyecto_finfuns( |
| 85 | project_id: int, | 85 | project_id: int, |
| 86 | db: Session = Depends(model.get_db), | 86 | db: Session = Depends(model.get_db), |
| 87 | - query: schema.QueryParams = Depends(), | 87 | + query: schema.QueryParamsPaginated = Depends(), |
| 88 | ): | 88 | ): |
| 89 | return get_clasificadores(db, 'finfun', project_id, query) | 89 | return get_clasificadores(db, 'finfun', project_id, query) |
| 90 | 90 | ||
| ... | @@ -93,7 +93,7 @@ def fetch_programa_proyecto_finfuns( | ... | @@ -93,7 +93,7 @@ def fetch_programa_proyecto_finfuns( |
| 93 | def fetch_programa_proyecto_actecos( | 93 | def fetch_programa_proyecto_actecos( |
| 94 | project_id: int, | 94 | project_id: int, |
| 95 | db: Session = Depends(model.get_db), | 95 | db: Session = Depends(model.get_db), |
| 96 | - query: schema.QueryParams = Depends(), | 96 | + query: schema.QueryParamsPaginated = Depends(), |
| 97 | ): | 97 | ): |
| 98 | return get_clasificadores(db, 'acteco', project_id, query) | 98 | return get_clasificadores(db, 'acteco', project_id, query) |
| 99 | 99 | ... | ... |
| ... | @@ -20,6 +20,10 @@ class QueryParams(BaseModel): | ... | @@ -20,6 +20,10 @@ class QueryParams(BaseModel): |
| 20 | gestion: Optional[int] = Query(default=None) | 20 | gestion: Optional[int] = Query(default=None) |
| 21 | nivel: Optional[str] = Query(default=None) | 21 | nivel: Optional[str] = Query(default=None) |
| 22 | 22 | ||
| 23 | + | ||
| 24 | +class QueryParamsPaginated(QueryParams): | ||
| 25 | + page: Optiona[int] = Query(default=None) | ||
| 26 | + | ||
| 23 | class DailyParams(BaseModel): | 27 | class DailyParams(BaseModel): |
| 24 | transferencias: Optional[bool] = Query(default=False) | 28 | transferencias: Optional[bool] = Query(default=False) |
| 25 | dias: Optional[int] = Query(default=None) | 29 | dias: Optional[int] = Query(default=None) | ... | ... |
-
Please register or login to post a comment