From c9bef3bbe41e6248f451068999e5945fb8ad4365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Thu, 26 Oct 2023 23:17:38 +0200 Subject: [PATCH] refac: naming convention --- api/ovdashboard_api/routers/v1/calendar.py | 2 +- api/ovdashboard_api/routers/v1/file.py | 2 +- api/ovdashboard_api/routers/v1/image.py | 2 +- api/ovdashboard_api/routers/v1/misc.py | 4 ++-- api/ovdashboard_api/routers/v1/text.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/ovdashboard_api/routers/v1/calendar.py b/api/ovdashboard_api/routers/v1/calendar.py index 63a603b..39165f8 100644 --- a/api/ovdashboard_api/routers/v1/calendar.py +++ b/api/ovdashboard_api/routers/v1/calendar.py @@ -28,7 +28,7 @@ async def start_router() -> None: "/list", responses=LM_CALENDAR.lister.responses, ) -async def list_all_calendars( +async def list_calendars( names: list[str] = Depends(LM_CALENDAR.lister.func), ) -> list[str]: return names diff --git a/api/ovdashboard_api/routers/v1/file.py b/api/ovdashboard_api/routers/v1/file.py index cafb309..0e1a847 100644 --- a/api/ovdashboard_api/routers/v1/file.py +++ b/api/ovdashboard_api/routers/v1/file.py @@ -40,7 +40,7 @@ async def start_router() -> None: "/list", responses=LM_FILE.lister.responses, ) -async def list_all_files( +async def list_files( names: list[str] = Depends(LM_FILE.lister.func), ) -> list[str]: return names diff --git a/api/ovdashboard_api/routers/v1/image.py b/api/ovdashboard_api/routers/v1/image.py index 5ff6d8f..891d9ed 100644 --- a/api/ovdashboard_api/routers/v1/image.py +++ b/api/ovdashboard_api/routers/v1/image.py @@ -41,7 +41,7 @@ async def start_router() -> None: "/list", responses=LM_IMAGE.lister.responses, ) -async def list_all_images( +async def list_images( names: list[str] = Depends(LM_IMAGE.lister.func), ) -> list[str]: return names diff --git a/api/ovdashboard_api/routers/v1/misc.py b/api/ovdashboard_api/routers/v1/misc.py index 8ddbd42..23dc2a3 100644 --- a/api/ovdashboard_api/routers/v1/misc.py +++ b/api/ovdashboard_api/routers/v1/misc.py @@ -26,7 +26,7 @@ async def start_router() -> None: @router.get("/lanip") -async def get_ip() -> str: +async def get_lan_ip() -> str: with socket( family=AF_INET, type=SOCK_DGRAM, @@ -43,7 +43,7 @@ async def get_ip() -> str: @router.get("/version") -async def get_version() -> str: +async def get_server_api_version() -> str: return importlib.metadata.version("ovdashboard-api") diff --git a/api/ovdashboard_api/routers/v1/text.py b/api/ovdashboard_api/routers/v1/text.py index 9afee69..6d822ac 100644 --- a/api/ovdashboard_api/routers/v1/text.py +++ b/api/ovdashboard_api/routers/v1/text.py @@ -39,7 +39,7 @@ async def start_router() -> None: "/list", responses=LM_TEXT.lister.responses, ) -async def list_all_texts( +async def list_texts( names: list[str] = Depends(LM_TEXT.lister.func), ) -> list[str]: return names