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:
parent
9057d764fa
commit
3650c92175
7 changed files with 51 additions and 282 deletions
|
|
@ -98,3 +98,22 @@ def get_integration_sync(name: str) -> Optional[dict]:
|
|||
def get_newbook_credentials_sync() -> Optional[dict]:
|
||||
"""Blocking variant of get_newbook_credentials for sync job contexts."""
|
||||
return _extract_newbook(get_integration_sync("newbook"))
|
||||
|
||||
|
||||
def _extract_resos(s: Optional[dict]) -> Optional[dict]:
|
||||
if not s:
|
||||
return None
|
||||
key = s.get("api_key") or ""
|
||||
if not key:
|
||||
return None
|
||||
return {"api_key": key}
|
||||
|
||||
|
||||
async def get_resos_credentials() -> Optional[dict]:
|
||||
"""Returns {'api_key'} from central settings, or None if not configured."""
|
||||
return _extract_resos(await get_integration("resos"))
|
||||
|
||||
|
||||
def get_resos_credentials_sync() -> Optional[dict]:
|
||||
"""Blocking variant of get_resos_credentials for sync job contexts."""
|
||||
return _extract_resos(get_integration_sync("resos"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue