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:
parent
acdf1ca145
commit
24b6f8245d
10 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
|
@ -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):
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
def test_stub():
|
||||
pass
|
Reference in a new issue