Skip to content

Commit

Permalink
core: services: cable_guy: Fix root path not working
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Nov 25, 2024
1 parent 5ba8e83 commit 7f47a81
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions core/services/cable_guy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ def update_host_dns(dns_data: DnsData) -> Any:
manager.dns.update_host_nameservers(dns_data)


app = VersionedFastAPI(
app,
version="1.0.0",
prefix_format="/v{major}.{minor}",
enable_latest=True,
)


@app.get("/")
async def root() -> HTMLResponse:
html_content = """
Expand All @@ -156,13 +164,6 @@ async def root() -> HTMLResponse:
return HTMLResponse(content=html_content, status_code=200)


app = VersionedFastAPI(
app,
version="1.0.0",
prefix_format="/v{major}.{minor}",
enable_latest=True,
)

if __name__ == "__main__":
if os.geteuid() != 0:
logger.error(
Expand Down

0 comments on commit 7f47a81

Please sign in to comment.