clan-app: Add swagger redirect

This commit is contained in:
Qubasa
2025-07-09 18:48:00 +07:00
parent 6d166cc7a7
commit 97650daa10
2 changed files with 3 additions and 6 deletions

View File

@@ -85,10 +85,7 @@ def app_run(app_opts: ClanAppOptions) -> int:
# HTTP-only mode - keep the server running
log.info("HTTP API server running...")
log.info(
f"Available API methods at: http://{app_opts.http_host}:{app_opts.http_port}/api/methods"
)
log.info(
f"Example request: curl -X POST http://{app_opts.http_host}:{app_opts.http_port}/api/v1/list_log_days"
f"Swagger: http://{app_opts.http_host}:{app_opts.http_port}/api/swagger"
)
log.info("Press Ctrl+C to stop the server")

View File

@@ -74,8 +74,8 @@ class HttpBridge(ApiBridge, BaseHTTPRequestHandler):
response_dict = dataclass_to_dict(response)
self._send_json_response_with_status(response_dict, 200)
log.debug(
f"HTTP response for {response._op_key}: {json.dumps(response_dict, indent=2)}"
) # noqa: SLF001
f"HTTP response for {response._op_key}: {json.dumps(response_dict, indent=2)}" # noqa: SLF001
)
def _create_success_response(
self, op_key: str, data: dict[str, Any]