This commit is contained in:
2022-02-02 03:45:37 +03:00
parent 6664bfebb9
commit 12d8c05d71

View File

@@ -41,9 +41,13 @@ class Method:
self.handler = handler
self.fields = fields
def __call__(self, queries):
def __call__(self, query):
if self.handler is None:
return self.function()
def wrap(function):
# print(func)
return function
return wrap
return self.function()
@@ -155,7 +159,10 @@ class JSONRPC:
try:
if method.handler is None:
pass
method.handler(
query
method.function
)
if params is None:
response = method.function()
elif isinstance(params, list):