Fix API keys list not showing — unwrap .keys from response

Backend returns { keys: [...] } but frontend was treating the whole
object as the array, so apiKeys.length was always falsy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-23 11:29:35 +00:00
parent d47e6dff40
commit 7007eb7020

View file

@ -5760,7 +5760,8 @@ const ApiKeysPage: React.FC = () => {
queryFn: async () => {
const response = await fetch('/forecasting/api/config/api-keys')
if (!response.ok) throw new Error('Failed to fetch API keys')
return response.json()
const data = await response.json()
return data.keys
},
})