diff --git a/api/kiwi_vpn_api/config.py b/api/kiwi_vpn_api/config.py index ca39caf..42ca7ae 100644 --- a/api/kiwi_vpn_api/config.py +++ b/api/kiwi_vpn_api/config.py @@ -1,12 +1,11 @@ -from enum import Enum import json +from enum import Enum from jose.constants import ALGORITHMS from passlib.context import CryptContext from pydantic import BaseModel, Field - -from sqlalchemy.engine import Engine from sqlalchemy import create_engine +from sqlalchemy.engine import Engine CONFIG_FILE = "tmp/config.json" diff --git a/api/kiwi_vpn_api/db/connection.py b/api/kiwi_vpn_api/db/connection.py index 991896e..6c45fd8 100644 --- a/api/kiwi_vpn_api/db/connection.py +++ b/api/kiwi_vpn_api/db/connection.py @@ -1,6 +1,7 @@ from typing import Generator + from sqlalchemy.engine import Engine -from sqlalchemy.orm import sessionmaker, Session +from sqlalchemy.orm import Session, sessionmaker from .models import ORMBaseModel diff --git a/api/kiwi_vpn_api/main.py b/api/kiwi_vpn_api/main.py index ea4a53e..2fa873a 100755 --- a/api/kiwi_vpn_api/main.py +++ b/api/kiwi_vpn_api/main.py @@ -4,8 +4,8 @@ import uvicorn from fastapi import FastAPI from . import config -from .routers import admin from .db import connection +from .routers import admin PRODUCTION_MODE = False diff --git a/api/kiwi_vpn_api/routers/admin.py b/api/kiwi_vpn_api/routers/admin.py index a9c72a0..8cca719 100644 --- a/api/kiwi_vpn_api/routers/admin.py +++ b/api/kiwi_vpn_api/routers/admin.py @@ -4,8 +4,7 @@ from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from .. import config - -from ..db import crud, schemas, connection +from ..db import connection, crud, schemas router = APIRouter(prefix="/admin")