cleanup TS type imports, remove programmatic version info

This commit is contained in:
Lucas Jensen
2024-12-01 19:29:03 -08:00
parent 925b334e4c
commit 12f5b4ff0f
5 changed files with 18 additions and 35 deletions

View File

@@ -12,12 +12,6 @@ class Controller:
def __init__(self) -> None:
pass
async def get_version(self) -> str:
repo = Repo(Path.cwd().parent.joinpath(".git"))
tags = [tag.tag for tag in repo.tags if tag.tag is not None]
tags.sort(key=lambda t: t.tagged_date)
return tags[-1].tag
async def get_all_videos(self) -> list[Video]:
return Video.select_all()

View File

@@ -43,7 +43,6 @@ class MeganJohns(BaseModel):
videos: list[Video]
bio: Bio
professional_services: list[ProfessionalService]
version: str
@app.get("/")
@@ -63,10 +62,4 @@ async def root() -> MeganJohns:
videos=videos,
bio=bio,
professional_services=services,
version=await controller.get_version(),
)
@app.get("/version")
async def version() -> str:
return await controller.get_version()