Commit
·
42b3110
1
Parent(s):
f60c774
redirecciona a la pagina de docs
Browse files- app/__init__.py/main.py +7 -1
app/__init__.py/main.py
CHANGED
|
@@ -4,7 +4,7 @@ import io
|
|
| 4 |
from typing import Any, Dict, Literal, Optional
|
| 5 |
|
| 6 |
from fastapi import FastAPI, HTTPException
|
| 7 |
-
from fastapi.responses import HTMLResponse, StreamingResponse
|
| 8 |
from pydantic import BaseModel, Field
|
| 9 |
|
| 10 |
from .renderer import render_html, render_pdf_bytes
|
|
@@ -34,6 +34,12 @@ class CompileRequest(BaseModel):
|
|
| 34 |
)
|
| 35 |
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
@app.get("/health")
|
| 38 |
def health_check():
|
| 39 |
"""
|
|
|
|
| 4 |
from typing import Any, Dict, Literal, Optional
|
| 5 |
|
| 6 |
from fastapi import FastAPI, HTTPException
|
| 7 |
+
from fastapi.responses import HTMLResponse, RedirectResponse, StreamingResponse
|
| 8 |
from pydantic import BaseModel, Field
|
| 9 |
|
| 10 |
from .renderer import render_html, render_pdf_bytes
|
|
|
|
| 34 |
)
|
| 35 |
|
| 36 |
|
| 37 |
+
@app.get("/")
|
| 38 |
+
def root():
|
| 39 |
+
"""Endpoint raíz que redirige automáticamente a la documentación."""
|
| 40 |
+
return RedirectResponse(url="/docs")
|
| 41 |
+
|
| 42 |
+
|
| 43 |
@app.get("/health")
|
| 44 |
def health_check():
|
| 45 |
"""
|