--
This commit is contained in:
@@ -29,7 +29,7 @@ class ListenerManager:
|
|||||||
channel_name=user.username,
|
channel_name=user.username,
|
||||||
client_id=settings.TWITCH_CLIENT_ID,
|
client_id=settings.TWITCH_CLIENT_ID,
|
||||||
client_secret=settings.TWITCH_CLIENT_SECRET,
|
client_secret=settings.TWITCH_CLIENT_SECRET,
|
||||||
bot_id=user.platform_user_id,
|
bot_id=user.id,
|
||||||
websocket_manager=websocket_manager,
|
websocket_manager=websocket_manager,
|
||||||
db_user_id=user.id
|
db_user_id=user.id
|
||||||
)
|
)
|
||||||
|
|||||||
6
main.py
6
main.py
@@ -62,9 +62,6 @@ app = FastAPI(lifespan=lifespan)
|
|||||||
# Configure Jinja2 templates
|
# Configure Jinja2 templates
|
||||||
templates = Jinja2Templates(directory=TEMPLATES_DIR)
|
templates = Jinja2Templates(directory=TEMPLATES_DIR)
|
||||||
|
|
||||||
# Add the authentication router
|
|
||||||
app.include_router(auth.router)
|
|
||||||
|
|
||||||
# Add session middleware. A secret key is required for signing the session cookie.
|
# Add session middleware. A secret key is required for signing the session cookie.
|
||||||
# We can reuse our encryption key for this, but in production you might want a separate key.
|
# We can reuse our encryption key for this, but in production you might want a separate key.
|
||||||
app.add_middleware(SessionMiddleware, secret_key=settings.ENCRYPTION_KEY)
|
app.add_middleware(SessionMiddleware, secret_key=settings.ENCRYPTION_KEY)
|
||||||
@@ -72,6 +69,9 @@ app.add_middleware(SessionMiddleware, secret_key=settings.ENCRYPTION_KEY)
|
|||||||
# Mount the 'static' directory using an absolute path for reliability
|
# Mount the 'static' directory using an absolute path for reliability
|
||||||
app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
|
app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
|
||||||
|
|
||||||
|
# Add the authentication router
|
||||||
|
app.include_router(auth.router)
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
async def read_root(request: Request):
|
async def read_root(request: Request):
|
||||||
return templates.TemplateResponse("login.html", {"request": request})
|
return templates.TemplateResponse("login.html", {"request": request})
|
||||||
|
|||||||
Reference in New Issue
Block a user