Folder structure change for backend
This commit is contained in:
parent
b0a0e23090
commit
8a7da6e146
0
backend/__init__.py
Normal file
0
backend/__init__.py
Normal file
@ -1,6 +1,4 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import json
|
|
||||||
import os
|
|
||||||
from typing import Any, Union
|
from typing import Any, Union
|
||||||
|
|
||||||
import bcrypt
|
import bcrypt
|
||||||
@ -9,7 +7,7 @@ from fastapi import Depends, HTTPException, status
|
|||||||
from fastapi.security import HTTPBearer
|
from fastapi.security import HTTPBearer
|
||||||
from jwt.exceptions import InvalidTokenError
|
from jwt.exceptions import InvalidTokenError
|
||||||
|
|
||||||
import queries
|
import backend.queries as queries
|
||||||
|
|
||||||
ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes
|
ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes
|
||||||
ALGORITHM = "HS256"
|
ALGORITHM = "HS256"
|
@ -6,12 +6,12 @@ from fastapi import Depends, FastAPI, HTTPException, status
|
|||||||
from fastapi.encoders import jsonable_encoder
|
from fastapi.encoders import jsonable_encoder
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
|
|
||||||
import queries
|
import backend.queries as queries
|
||||||
from auth import Hasher, create_access_token, get_current_user
|
from backend.auth import Hasher, create_access_token, get_current_user
|
||||||
from crypto import (deserialize_into_bytes, fernet_decrypt, fernet_encrypt,
|
from backend.crypto import (deserialize_into_bytes, fernet_decrypt,
|
||||||
generate_random_encryption_key, generate_user_passkey,
|
fernet_encrypt, generate_random_encryption_key,
|
||||||
serialize_bytes)
|
generate_user_passkey, serialize_bytes)
|
||||||
from models import Key, Secret, User, UserLogin
|
from backend.models import Key, Secret, User, UserLogin
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user