Checking readiness of main app in Controller instead of javascript requests, which break with CORS.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-03-08 16:05:56 -06:00
parent 8c294dad39
commit ef32e8b42d
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 227 additions and 43 deletions

View file

@ -325,3 +325,14 @@ class BranchResponse(BaseModel):
"""Response model for current git branch."""
branch: Optional[str] = Field(description="Current git branch, or null if unavailable")
# ============================================================================
# Readiness
# ============================================================================
class ReadyResponse(BaseModel):
"""Response model for /api/ready endpoint."""
api: bool = Field(description="Whether the main WROLPi API is responding")
app: bool = Field(description="Whether the React app is responding")