Tweaks for v1.0

This commit is contained in:
Ian Renton
2025-10-14 19:42:09 +01:00
parent 67a99a6d39
commit d02f0e1afc
4 changed files with 27 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ import pytz
from bottle import run, request, response, template
from core.config import MAX_SPOT_AGE, ALLOW_SPOTTING
from core.constants import BANDS, ALL_MODES, MODE_TYPES, SIGS, CONTINENTS
from core.constants import BANDS, ALL_MODES, MODE_TYPES, SIGS, CONTINENTS, SOFTWARE_VERSION
from data.spot import Spot
@@ -27,6 +27,9 @@ class WebServer:
self.thread.daemon = True
self.status = "Starting"
# Base template data
bottle.BaseTemplate.defaults['software_version'] = SOFTWARE_VERSION
# Routes for API calls
bottle.get("/api/v1/spots")(lambda: self.serve_api(self.get_spot_list_with_filters()))
bottle.get("/api/v1/alerts")(lambda: self.serve_api(self.get_alert_list_with_filters()))