[+] HTML endpoint

This commit is contained in:
2025-03-23 00:58:19 -04:00
parent 5d76f74c1e
commit a5ed8b7de7
3 changed files with 12 additions and 3 deletions
+8
View File
@@ -6,6 +6,7 @@ import uvicorn
import winsound
from fastapi import FastAPI, HTTPException
from fastapi.middleware.cors import CORSMiddleware
from starlette.responses import HTMLResponse
from vk import press_key, release_key
@@ -24,6 +25,13 @@ app.add_middleware(
PATH = Path('aime.txt')
AUDIO_EFFECT = Path(__file__).parent / 'audio/mixkit-gaming-lock-2848.wav'
HTML = Path(__file__).parent.parent / "web/dist/index.html"
@app.get("/", response_class=HTMLResponse)
def read_root():
return HTML.read_text()
@app.post("/scan")
def scan(uid: str):