feat(connect): return site_numeric_id in heartbeat response
Local backend needs the cloud DB integer PK to call Connect API endpoints (menu sync, order pending poll). Heartbeat is the only authenticated channel available at startup, so we piggyback the id there rather than adding a new endpoint. Changes: - schemas/site.py: site_numeric_id: int | None added to HeartbeatResponse - routers/heartbeat.py: site_numeric_id=site.id included in response Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,4 +39,5 @@ def heartbeat(
|
||||
expires_at=site.license_expires_at,
|
||||
latest_version=settings.LATEST_VERSION,
|
||||
waiter_domain=site.waiter_domain,
|
||||
site_numeric_id=site.id,
|
||||
)
|
||||
|
||||
@@ -57,3 +57,4 @@ class HeartbeatResponse(BaseModel):
|
||||
expires_at: datetime
|
||||
latest_version: str | None = None
|
||||
waiter_domain: str | None = None
|
||||
site_numeric_id: int | None = None # cloud DB pk — needed by Connect sync loops
|
||||
|
||||
Reference in New Issue
Block a user