From e832032cd6f47afa1261457412863e44260d3ddb Mon Sep 17 00:00:00 2001 From: tanshu Date: Mon, 4 May 2020 14:59:10 +0530 Subject: [PATCH] Final touchups, moved the root route to routers Changed the root message --- bifrost/main.py | 5 ----- bifrost/routers.py | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bifrost/main.py b/bifrost/main.py index eae8cac..7791771 100644 --- a/bifrost/main.py +++ b/bifrost/main.py @@ -7,11 +7,6 @@ from .config import Settings as settings app = FastAPI() -@app.get("/") -async def root(): - return {"message": "Hello World"} - - app.include_router(routers.router) diff --git a/bifrost/routers.py b/bifrost/routers.py index e8cae45..edb36af 100644 --- a/bifrost/routers.py +++ b/bifrost/routers.py @@ -14,6 +14,11 @@ def get_settings(): return config.Settings +@router.get("/") +async def root(): + return {"message": "Bifrost updater version 2.0"} + + @router.get("/update") def update_view( domain: str,