Removed redundant stuff
This commit is contained in:
parent
b6f4eddb42
commit
f5b274a678
5 changed files with 1 additions and 43 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
def get_example_message():
|
|
||||||
|
|
||||||
return {
|
|
||||||
"message": "Hello, this is an example response :]"
|
|
||||||
}
|
|
||||||
|
|
@ -7,14 +7,6 @@ from app.database import (
|
||||||
)
|
)
|
||||||
from app.models.project import Project
|
from app.models.project import Project
|
||||||
|
|
||||||
# For now, this is a manifest for the project model architecture:
|
|
||||||
|
|
||||||
# A project consists of:
|
|
||||||
# ID (Autoincrement num, required),
|
|
||||||
# Parent (Num, optional, if this field contains a number (not none or 0), it is considered a child project of project with ID = num)
|
|
||||||
# Title (Required, text),
|
|
||||||
# Content (Optional, for now is string text but needs to store full Markdown including images in the future)
|
|
||||||
|
|
||||||
|
|
||||||
def get_all():
|
def get_all():
|
||||||
return get_from_database(Project)
|
return get_from_database(Project)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ from fastapi import FastAPI
|
||||||
|
|
||||||
from app.config import settings
|
from app.config import settings
|
||||||
from app.database import create_database
|
from app.database import create_database
|
||||||
from app.routers import example_route, project_route
|
from app.routers import project_route
|
||||||
|
|
||||||
|
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
|
|
@ -22,6 +22,4 @@ app = FastAPI(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
app.include_router(example_route.router)
|
|
||||||
|
|
||||||
app.include_router(project_route.router)
|
app.include_router(project_route.router)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
from sqlmodel import SQLModel, Field
|
|
||||||
|
|
||||||
class ExampleModel(SQLModel, table=True):
|
|
||||||
|
|
||||||
id: int | None = Field(
|
|
||||||
default=None,
|
|
||||||
primary_key=True
|
|
||||||
)
|
|
||||||
|
|
||||||
example_text: str
|
|
||||||
|
|
||||||
example_number: int
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
from fastapi import APIRouter
|
|
||||||
|
|
||||||
from app.logic.example_logic import get_example_message
|
|
||||||
|
|
||||||
router = APIRouter(
|
|
||||||
prefix="/example",
|
|
||||||
tags=["Example"]
|
|
||||||
)
|
|
||||||
|
|
||||||
@router.get("/")
|
|
||||||
def get_example():
|
|
||||||
|
|
||||||
return(
|
|
||||||
get_example_message()
|
|
||||||
)
|
|
||||||
Loading…
Reference in a new issue