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:
Arksine
2020-11-10 07:44:35 -05:00
parent 7abc86847e
commit 92d1715d88
3 changed files with 29 additions and 27 deletions

View File

@@ -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)