Move Resos API key to central Settings service; add sidebar scrollbar styling

Removes the standalone resos_api_key from the forecasting app's own
system_config table. All credential fetches now go through
central_settings.get_resos_credentials() / get_resos_credentials_sync()
which pull from the Settings app (LXC 116) via the internal integration
endpoint — the same pattern already used for NewBook. The Resos API
Config section is removed from the forecasting Settings page; users
manage the key in the central Settings app instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-13 14:35:35 +00:00
parent 9057d764fa
commit 3650c92175
7 changed files with 51 additions and 282 deletions

View file

@ -44,11 +44,10 @@ class ResosClient:
@classmethod
async def from_db(cls, db):
"""Create client with credentials from database"""
from api.config import _get_config_value
api_key = await _get_config_value(db, "resos_api_key")
return cls(api_key=api_key)
"""Create client with credentials from central Settings service"""
from services.central_settings import get_resos_credentials
creds = await get_resos_credentials()
return cls(api_key=creds["api_key"] if creds else None)
async def __aenter__(self):
self.client = httpx.AsyncClient(timeout=30.0)