app: Simplify request handlers
There is no need to pass the auth, server, or websocket manager objects to request handlers. They can be retreived directly from the application reference. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
@@ -268,9 +268,9 @@ class WebsocketManager:
|
||||
self.websockets = {}
|
||||
|
||||
class WebSocket(WebSocketHandler):
|
||||
def initialize(self, wsm, auth):
|
||||
self.wsm = wsm
|
||||
self.auth = auth
|
||||
def initialize(self, main_app):
|
||||
self.auth = main_app.get_auth()
|
||||
self.wsm = main_app.get_websocket_manager()
|
||||
self.rpc = self.wsm.rpc
|
||||
self.uid = id(self)
|
||||
|
||||
|
Reference in New Issue
Block a user