diff --git a/royalnet/constellation/api/apidata.py b/royalnet/constellation/api/apidata.py index 0a6bf724..90c83002 100644 --- a/royalnet/constellation/api/apidata.py +++ b/royalnet/constellation/api/apidata.py @@ -9,10 +9,11 @@ log = logging.getLogger(__name__) class ApiData(dict): - def __init__(self, data, star): + def __init__(self, data, star, method): super().__init__(data) self.star = star self._session = None + self.method = method def __missing__(self, key): raise MissingParameterError(f"Missing '{key}'") diff --git a/royalnet/constellation/api/apistar.py b/royalnet/constellation/api/apistar.py index d7ba7549..b6a429ec 100644 --- a/royalnet/constellation/api/apistar.py +++ b/royalnet/constellation/api/apistar.py @@ -29,7 +29,7 @@ class ApiStar(PageStar, ABC): data = await request.json() except JSONDecodeError: data = {} - apidata = ApiData(data, self) + apidata = ApiData(data=data, star=self, method=request.method) try: response = await self.api(apidata) except NotFoundError as e: diff --git a/royalnet/version.py b/royalnet/version.py index b5b36ad3..e489a4b9 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.8.2" +semantic = "5.8.3"