Add favicon to the app
Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/d5386c25-5b4f-4f21-8537-ae2d0fc06c04 Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+6
-1
@@ -5,7 +5,7 @@ from datetime import datetime
|
||||
|
||||
from fastapi import Depends, FastAPI, Request
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import HTMLResponse
|
||||
from fastapi.responses import FileResponse, HTMLResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.templating import Jinja2Templates
|
||||
|
||||
@@ -369,6 +369,11 @@ async def index(request: Request):
|
||||
return templates.TemplateResponse(request, "index.html")
|
||||
|
||||
|
||||
@app.get("/favicon.ico", include_in_schema=False)
|
||||
async def favicon():
|
||||
return FileResponse(os.path.join(os.path.dirname(__file__), "static", "img", "favicon.ico"))
|
||||
|
||||
|
||||
# Individual page routes
|
||||
@app.get("/dashboard", response_class=HTMLResponse)
|
||||
async def dashboard(request: Request):
|
||||
|
||||
Reference in New Issue
Block a user