Skip to content

Commit 0d853bd

Browse files
committed
feat: health endpoint
1 parent b5a840d commit 0d853bd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ def rate_limit_exceeded_handler(
6060
)
6161

6262

63+
@app.get("/v1/health")
64+
async def health() -> dict[str, str]:
65+
"""Endpoint to check if the service is alive."""
66+
return {"status": "ok"}
67+
68+
6369
@app.post("/v1")
6470
@limiter.limit("60/minute")
6571
async def index(request: Request) -> dict[str, object]:
@@ -81,6 +87,6 @@ async def index(request: Request) -> dict[str, object]:
8187
) from None
8288

8389
return {
84-
"detail": "successfully linted",
90+
"status": "success",
8591
"data": [r.into_dict() for r in _lint(text)],
8692
}

0 commit comments

Comments
 (0)