15 lines
438 B
Python
15 lines
438 B
Python
"""Toy GIS Dispatch Adapter."""
|
|
from __future__ import annotations
|
|
from crisisops.adapters_registry import Adapter
|
|
|
|
|
|
class GISDispatchAdapter(Adapter):
|
|
def __init__(self):
|
|
super().__init__("gis_dispatch")
|
|
|
|
def adapt(self, data):
|
|
# Minimal normalization for route dispatch requests
|
|
if "route" in data:
|
|
data["route"] = data["route"].strip()
|
|
return {"adapter": self.name, "adapted": data}
|