diff --git a/robyn/processpool.py b/robyn/processpool.py index 54673889..f1b0839f 100644 --- a/robyn/processpool.py +++ b/robyn/processpool.py @@ -188,8 +188,8 @@ def spawn_process( for middleware_type, middleware_function in global_middlewares: server.add_global_middleware(middleware_type, middleware_function) - for route_type, endpoint, function in route_middlewares: - server.add_middleware_route(route_type, endpoint, function) + for http_route_type, endpoint, function in route_middlewares: + server.add_middleware_route(http_route_type, endpoint, function) if Events.STARTUP in event_handlers: server.add_startup_handler(event_handlers[Events.STARTUP]) diff --git a/robyn/ws.py b/robyn/ws.py index 231b7b75..f9f08231 100644 --- a/robyn/ws.py +++ b/robyn/ws.py @@ -23,7 +23,7 @@ class WebSocket: def __init__(self, robyn_object: "Robyn", endpoint: str, config: Config = Config(), dependencies: DependencyMap = DependencyMap()) -> None: self.robyn_object = robyn_object self.endpoint = endpoint - self.methods = {} + self.methods: dict = {} self.config = config self.dependencies = dependencies