Add global state module

This commit is contained in:
2024-08-13 19:21:48 -04:00
parent 12a6f72767
commit feea67c370
8 changed files with 209 additions and 16 deletions

View File

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