Folder structure change for backend

This commit is contained in:
Gourav Kumar 2024-08-11 20:06:53 +05:30
parent b0a0e23090
commit 8a7da6e146
7 changed files with 7 additions and 9 deletions

0
backend/__init__.py Normal file
View File

View File

@ -1,6 +1,4 @@
import datetime
import json
import os
from typing import Any, Union
import bcrypt
@ -9,7 +7,7 @@ from fastapi import Depends, HTTPException, status
from fastapi.security import HTTPBearer
from jwt.exceptions import InvalidTokenError
import queries
import backend.queries as queries
ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes
ALGORITHM = "HS256"

View File

@ -6,12 +6,12 @@ from fastapi import Depends, FastAPI, HTTPException, status
from fastapi.encoders import jsonable_encoder
from fastapi.middleware.cors import CORSMiddleware
import queries
from auth import Hasher, create_access_token, get_current_user
from crypto import (deserialize_into_bytes, fernet_decrypt, fernet_encrypt,
generate_random_encryption_key, generate_user_passkey,
serialize_bytes)
from models import Key, Secret, User, UserLogin
import backend.queries as queries
from backend.auth import Hasher, create_access_token, get_current_user
from backend.crypto import (deserialize_into_bytes, fernet_decrypt,
fernet_encrypt, generate_random_encryption_key,
generate_user_passkey, serialize_bytes)
from backend.models import Key, Secret, User, UserLogin
app = FastAPI()