Fix: NameError: name 'json' is not defined
Some checks failed
Test / Builder (push) Failing after 35s

This commit is contained in:
2025-11-04 23:06:21 +03:00
parent be945dd7cd
commit dc0f4cf472

View File

@@ -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,