Fixes and cleanups #11
@ -9,7 +9,21 @@ from starlette.status import (
|
||||
HTTP_422_UNPROCESSABLE_ENTITY,
|
||||
)
|
||||
|
||||
from classes.exceptions import *
|
||||
from classes.exceptions import (
|
||||
AlbumNotFoundError,
|
||||
AlbumAlreadyExistsError,
|
||||
AlbumIncorrectError,
|
||||
PhotoNotFoundError,
|
||||
PhotoSearchQueryEmptyError,
|
||||
VideoNotFoundError,
|
||||
VideoSearchQueryEmptyError,
|
||||
SearchPageInvalidError,
|
||||
SearchTokenInvalidError,
|
||||
AccessTokenInvalidError,
|
||||
UserEmailCodeInvalid,
|
||||
UserAlreadyExists,
|
||||
UserCredentialsInvalid,
|
||||
)
|
||||
from modules.app import app
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import pickle
|
||||
import re
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from os import makedirs, path, remove, system
|
||||
@ -12,30 +11,37 @@ import aiofiles
|
||||
from bson.errors import InvalidId
|
||||
from bson.objectid import ObjectId
|
||||
from fastapi import Security, UploadFile
|
||||
from fastapi.exceptions import HTTPException
|
||||
from fastapi.responses import Response, UJSONResponse
|
||||
from jose import JWTError, jwt
|
||||
from magic import Magic
|
||||
from plum.exceptions import UnpackError
|
||||
from pydantic import ValidationError
|
||||
from pymongo import DESCENDING
|
||||
from starlette.status import (HTTP_204_NO_CONTENT, HTTP_401_UNAUTHORIZED,
|
||||
HTTP_409_CONFLICT)
|
||||
from starlette.status import HTTP_204_NO_CONTENT, HTTP_409_CONFLICT
|
||||
|
||||
from classes.exceptions import (AccessTokenInvalidError,
|
||||
AlbumNameNotFoundError, PhotoNotFoundError,
|
||||
PhotoSearchQueryEmptyError,
|
||||
SearchPageInvalidError,
|
||||
SearchTokenInvalidError)
|
||||
from classes.exceptions import (
|
||||
AccessTokenInvalidError,
|
||||
AlbumNameNotFoundError,
|
||||
PhotoNotFoundError,
|
||||
PhotoSearchQueryEmptyError,
|
||||
SearchPageInvalidError,
|
||||
SearchTokenInvalidError,
|
||||
)
|
||||
from classes.models import Photo, PhotoPublic, SearchResultsPhoto
|
||||
from modules.app import app
|
||||
from modules.database import col_albums, col_photos, col_tokens
|
||||
from modules.exif_reader import extract_location
|
||||
from modules.hasher import get_duplicates, get_phash
|
||||
from modules.scheduler import scheduler
|
||||
from modules.security import (ALGORITHM, SECRET_KEY, TokenData, User,
|
||||
create_access_token, get_current_active_user,
|
||||
get_user)
|
||||
from modules.security import (
|
||||
ALGORITHM,
|
||||
SECRET_KEY,
|
||||
TokenData,
|
||||
User,
|
||||
create_access_token,
|
||||
get_current_active_user,
|
||||
get_user,
|
||||
)
|
||||
from modules.utils import configGet, logWrite
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import pickle
|
||||
import re
|
||||
from datetime import datetime, timezone
|
||||
from os import makedirs, path, remove
|
||||
|
Loading…
Reference in New Issue
Block a user