Update
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user