Update main.py
Browse files
main.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
from fastapi import FastAPI, Depends, HTTPException, APIRouter
|
2 |
from fastapi.requests import Request
|
3 |
from fastapi.responses import HTMLResponse
|
@@ -9,14 +11,14 @@ import auth
|
|
9 |
import tts
|
10 |
|
11 |
app = FastAPI()
|
12 |
-
router = APIRouter()
|
13 |
templates = Jinja2Templates(directory="templates")
|
14 |
|
15 |
# Include the authentication router with the prefix '/auth'
|
16 |
-
|
17 |
|
18 |
# Include the TTS router with the prefix '/tts'
|
19 |
-
|
20 |
|
21 |
# Dependency for verifying the user's token
|
22 |
def get_current_user(token: str = Depends(verify_token)):
|
|
|
1 |
+
#main.py
|
2 |
+
|
3 |
from fastapi import FastAPI, Depends, HTTPException, APIRouter
|
4 |
from fastapi.requests import Request
|
5 |
from fastapi.responses import HTMLResponse
|
|
|
11 |
import tts
|
12 |
|
13 |
app = FastAPI()
|
14 |
+
#router = APIRouter()
|
15 |
templates = Jinja2Templates(directory="templates")
|
16 |
|
17 |
# Include the authentication router with the prefix '/auth'
|
18 |
+
app.include_router(auth.router, prefix="/auth")
|
19 |
|
20 |
# Include the TTS router with the prefix '/tts'
|
21 |
+
app.include_router(tts.router, prefix="/tts")
|
22 |
|
23 |
# Dependency for verifying the user's token
|
24 |
def get_current_user(token: str = Depends(verify_token)):
|