fix: healthz 路径改成 /api/v1/healthz(归到 API 前缀下)
This commit is contained in:
@@ -103,7 +103,7 @@ app.include_router(admin.router, prefix=API_PREFIX)
|
||||
|
||||
|
||||
# === 健康检查 ===
|
||||
@app.get("/healthz", include_in_schema=False)
|
||||
@app.get(f"{API_PREFIX}/healthz", include_in_schema=False)
|
||||
async def healthz():
|
||||
try:
|
||||
await get_redis().ping()
|
||||
@@ -112,6 +112,6 @@ async def healthz():
|
||||
return {"status": "ok"}
|
||||
|
||||
|
||||
@app.get("/", include_in_schema=False)
|
||||
@app.get(f"{API_PREFIX}/", include_in_schema=False)
|
||||
async def root():
|
||||
return {"name": "diary-news", "version": app.version, "docs": "/api/docs"}
|
||||
return {"name": "diary-news", "version": app.version, "docs": f"{API_PREFIX}/docs"}
|
||||
|
||||
Reference in New Issue
Block a user