1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-03 16:24:20 +00:00

publish: 5.8.3

This commit is contained in:
Steffo 2020-05-07 01:36:28 +02:00
parent caf52b9e1c
commit a3f472193f
3 changed files with 4 additions and 3 deletions

View file

@ -9,10 +9,11 @@ log = logging.getLogger(__name__)
class ApiData(dict): class ApiData(dict):
def __init__(self, data, star): def __init__(self, data, star, method):
super().__init__(data) super().__init__(data)
self.star = star self.star = star
self._session = None self._session = None
self.method = method
def __missing__(self, key): def __missing__(self, key):
raise MissingParameterError(f"Missing '{key}'") raise MissingParameterError(f"Missing '{key}'")

View file

@ -29,7 +29,7 @@ class ApiStar(PageStar, ABC):
data = await request.json() data = await request.json()
except JSONDecodeError: except JSONDecodeError:
data = {} data = {}
apidata = ApiData(data, self) apidata = ApiData(data=data, star=self, method=request.method)
try: try:
response = await self.api(apidata) response = await self.api(apidata)
except NotFoundError as e: except NotFoundError as e:

View file

@ -1 +1 @@
semantic = "5.8.2" semantic = "5.8.3"