← back to Ken
Ken: fix Weather page 400 — server now handles 'get_data' action (on-mount load), aliased to fetch_all
16c240e35512d43ff4231d7d4f9e155d2c95c196 · 2026-07-14 11:07:59 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 16c240e35512d43ff4231d7d4f9e155d2c95c196
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jul 14 11:07:59 2026 -0700
Ken: fix Weather page 400 — server now handles 'get_data' action (on-mount load), aliased to fetch_all
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
kalshi-dash/server.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kalshi-dash/server.js b/kalshi-dash/server.js
index 384067c..1105f63 100644
--- a/kalshi-dash/server.js
+++ b/kalshi-dash/server.js
@@ -1194,7 +1194,9 @@ const routes = {
'POST /api/weather': async (req, res) => {
const body = await readBody(req);
- if (body.action === 'fetch_all') {
+ // 'get_data' (on-mount load) and 'fetch_all' (refresh) both return a fresh
+ // synthetic forecast — weather is generated on demand, there's no stored cache.
+ if (body.action === 'fetch_all' || body.action === 'get_data') {
try {
const cities = body.cities || ['New York', 'Chicago', 'Miami', 'Denver', 'Los Angeles', 'Seattle'];
const useNws = body.force_nws === true; // opt-in to real NWS (flaky from this server)
← a327393 Ken: live-run status chip in dashboard header (motion graphi
·
back to Ken
·
Ken: retry/backoff in geminiAnalyze for shared-Ollama 'serve d83c6ee →