Fix: NameError: name 'json' is not defined
Some checks failed
Test / Builder (push) Failing after 35s
Some checks failed
Test / Builder (push) Failing after 35s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
__author__ = 'RemiZOffAlex'
|
||||
__email__ = 'remizoffalex@mail.ru'
|
||||
|
||||
import json
|
||||
import jinja2
|
||||
import logging
|
||||
import pathlib
|
||||
@@ -38,8 +39,14 @@ class APIHandler:
|
||||
|
||||
async def post(self, request) -> Response:
|
||||
try:
|
||||
if self.debug:
|
||||
print(request)
|
||||
json_data = await request.json()
|
||||
if self.debug:
|
||||
print(json_data)
|
||||
result = self.jsonrpc(json_data)
|
||||
if self.debug:
|
||||
print(result)
|
||||
body = json.dumps(result, cls=JSONRPCEncoder)
|
||||
response = Response(
|
||||
text=body,
|
||||
|
||||
Reference in New Issue
Block a user