mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-24 16:24:32 +00:00
First attempt at converting "sig" to "activity" for v3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
|
||||
from webserver.handlers.api.spots import APISpotsHandler, APISpotsStreamHandler
|
||||
from webserver.handlers.api.v2_compatibility import V2APISpotsHandler, V2APISpotsStreamHandler
|
||||
|
||||
_GRID_SOURCE_RE = re.compile(r'"dx_location_source":\s*"GRID"')
|
||||
_LEGACY_PARAM_TO_HEADER_MAP = {
|
||||
@@ -24,8 +24,9 @@ def _handle_legacy_params(handler):
|
||||
handler.request.headers[header] = value
|
||||
|
||||
|
||||
class V1APISpotsHandler(APISpotsHandler):
|
||||
"""API request handler for /api/v1/spots (GET). Included in early Spothole v2 for backwards compatibility."""
|
||||
class V1APISpotsHandler(V2APISpotsHandler):
|
||||
"""API request handler for /api/v1/spots (GET). Included in Spothole v2 onwards for backwards
|
||||
compatibility."""
|
||||
|
||||
def prepare(self):
|
||||
_handle_legacy_params(self)
|
||||
@@ -37,8 +38,9 @@ class V1APISpotsHandler(APISpotsHandler):
|
||||
super().write(chunk)
|
||||
|
||||
|
||||
class V1APISpotsStreamHandler(APISpotsStreamHandler):
|
||||
"""API request handler for /api/v1/spots/stream (SSE). Included in early Spothole v2 for backwards compatibility."""
|
||||
class V1APISpotsStreamHandler(V2APISpotsStreamHandler):
|
||||
"""API request handler for /api/v1/spots/stream (SSE). Included in Spothole v2 onwards for backwards
|
||||
compatibility."""
|
||||
|
||||
def prepare(self):
|
||||
_handle_legacy_params(self)
|
||||
|
||||
Reference in New Issue
Block a user