mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Tweaks for v1.0
This commit is contained in:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user