Add global state module
This commit is contained in:
@ -9,11 +9,12 @@ from fastapi import FastAPI
|
||||
|
||||
class RandMsg(FastAPI):
|
||||
"""Random Message Endpoint"""
|
||||
def __init__(self, app: FastAPI, util, constants): # pylint: disable=super-init-not-called
|
||||
def __init__(self, app: FastAPI, util, constants, glob_state): # pylint: disable=super-init-not-called
|
||||
self.app = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
||||
self.glob_state = glob_state
|
||||
|
||||
self.endpoint_name = "randmsg"
|
||||
|
||||
app.add_api_route(f"/{self.endpoint_name}/", self.randmsg_handler, methods=["POST"])
|
||||
|
Reference in New Issue
Block a user