modify the project, everything go under app folder
This commit is contained in:
@@ -3,10 +3,10 @@ from fastapi import APIRouter, Depends, Request, HTTPException
|
|||||||
from fastapi.responses import RedirectResponse
|
from fastapi.responses import RedirectResponse
|
||||||
import os
|
import os
|
||||||
import secrets
|
import secrets
|
||||||
from auth.deps import get_current_user
|
from app.auth.deps import get_current_user
|
||||||
from db import SessionLocal
|
from app.db import SessionLocal
|
||||||
from models import User
|
from app.models import User
|
||||||
from auth.jwt import create_access_token, create_refresh_token, decode_token
|
from app.auth.jwt import create_access_token, create_refresh_token, decode_token
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
from fastapi import Request, HTTPException
|
from fastapi import Request, HTTPException
|
||||||
import jwt
|
import app.auth.jwt as jwt
|
||||||
import os
|
import os
|
||||||
|
|
||||||
JWT_SECRET = os.getenv("JWT_SECRET")
|
JWT_SECRET = os.getenv("JWT_SECRET")
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import jwt
|
import app.auth.jwt as jwt
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
import os
|
import os
|
||||||
from fastapi import HTTPException, status
|
from fastapi import HTTPException, status
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
from auth import router as auth_router
|
from app.auth import router as auth_router
|
||||||
from models import Base
|
from app.models import Base
|
||||||
from db import engine
|
from app.db import engine
|
||||||
|
|
||||||
Base.metadata.create_all(bind=engine)
|
Base.metadata.create_all(bind=engine)
|
||||||
|
|
||||||
Reference in New Issue
Block a user