Update
This commit is contained in:
+9
-2
@@ -41,9 +41,13 @@ class Method:
|
|||||||
self.handler = handler
|
self.handler = handler
|
||||||
self.fields = fields
|
self.fields = fields
|
||||||
|
|
||||||
def __call__(self, queries):
|
def __call__(self, query):
|
||||||
if self.handler is None:
|
if self.handler is None:
|
||||||
return self.function()
|
return self.function()
|
||||||
|
def wrap(function):
|
||||||
|
# print(func)
|
||||||
|
return function
|
||||||
|
return wrap
|
||||||
return self.function()
|
return self.function()
|
||||||
|
|
||||||
|
|
||||||
@@ -155,7 +159,10 @@ class JSONRPC:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if method.handler is None:
|
if method.handler is None:
|
||||||
pass
|
method.handler(
|
||||||
|
query
|
||||||
|
method.function
|
||||||
|
)
|
||||||
if params is None:
|
if params is None:
|
||||||
response = method.function()
|
response = method.function()
|
||||||
elif isinstance(params, list):
|
elif isinstance(params, list):
|
||||||
|
|||||||
Reference in New Issue
Block a user