diff --git a/ahserver/functionProcessor.py b/ahserver/functionProcessor.py index cd040fa..83b9792 100755 --- a/ahserver/functionProcessor.py +++ b/ahserver/functionProcessor.py @@ -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)