Aurora update

This commit is contained in:
2026-06-25 00:01:50 -04:00
parent b8ffc20360
commit 84707b2777
4 changed files with 107 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import {getAirTraffic, getAirTrafficHistory, getShapes} from './airtraffic.mjs';
import {getWeatherCondition} from './openweather.mjs';
import {lastForecast, getForecast, forecastTTL} from './forecast.mjs';
import {dailyWeather, hourlyWeather} from './openmeteo.mjs';
import {Aurora} from './aurora.mjs';
// ── Uncaught error handlers ───────────────────────────────────────────────────
@@ -145,6 +146,7 @@ app.get('/api/position', async (req, res) => {
// ── Space ─────────────────────────────────────────────────────────────────────
app.get('/api/aurora', async (req, res) => res.json(await Aurora.get()));
app.get('/api/space', async (req, res) => {
const {fields} = req.query;
res.json(filterFields(await getSpaceWeather(), fields));