refactor(backend): modularize files logic (#33)

* refactor(backend): consolidate files logic in module

* refactor(backend): move tests to match existing pattern
This commit is contained in:
Marc 2023-08-20 11:54:40 -04:00 committed by GitHub
parent acdf1ca145
commit 24b6f8245d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,6 @@
from fastapi import APIRouter, HTTPException
from use_cases.exceptions import DoesNotExist
from exceptions import DoesNotExist
import auth.use_cases as auth_use_cases
import auth.base as auth_base

View file

@ -9,7 +9,7 @@ import typing_extensions as typing
import argon2
from db import get_connection
from use_cases.exceptions import DoesNotExist
from exceptions import DoesNotExist
import auth.base as auth_base

View file

@ -9,7 +9,9 @@ import pathlib
from fastapi import APIRouter, HTTPException, UploadFile
from fastapi.responses import FileResponse
import use_cases.files as files_use_cases
import files.use_cases as files_use_cases
from settings import settings
router = APIRouter(prefix="/files")

View file

@ -11,7 +11,8 @@ import typing_extensions as typing
from db import get_connection
from settings import settings
from use_cases.exceptions import DoesNotExist
from exceptions import DoesNotExist
class FileRecord(typing.TypedDict):

View file

@ -5,7 +5,7 @@ from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
import auth.routes as auth_routes
import api.files as files_routes
import files.routes as files_routes
app = FastAPI()

View file

@ -1,2 +0,0 @@
def test_stub():
pass