mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
publish: 5.8.3
This commit is contained in:
parent
caf52b9e1c
commit
a3f472193f
3 changed files with 4 additions and 3 deletions
|
@ -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}'")
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
semantic = "5.8.2"
|
semantic = "5.8.3"
|
||||||
|
|
Loading…
Reference in a new issue