bugfix
This commit is contained in:
parent
9c04b7c50e
commit
f596df7696
@ -18,7 +18,7 @@ class FunctionProcessor(BaseProcessor):
|
||||
|
||||
async def path_call(self, request, path):
|
||||
path1 = request.path[len(self.config_opts['leading']):]
|
||||
args = [request]
|
||||
args = []
|
||||
if len(path1) > 0:
|
||||
if path1[0] == '/':
|
||||
path1 = path1[1:]
|
||||
@ -35,8 +35,8 @@ class FunctionProcessor(BaseProcessor):
|
||||
self.run_ns['request'] = request
|
||||
globals().update(self.run_ns)
|
||||
if inspect.iscoroutinefunction(f):
|
||||
return await f(*args, **self.run_ns)
|
||||
return f(*args, **self.run_ns)
|
||||
return await f(request, self.run_ns, *args)
|
||||
return f(request, self.run_ns, *args)
|
||||
|
||||
async def datahandle(self,request):
|
||||
x = await self.path_call(request, self.path)
|
||||
|
Loading…
Reference in New Issue
Block a user