From 71969bc1f98439b0c3df60b1a46841875ca4851f Mon Sep 17 00:00:00 2001 From: ks129 <45097959+ks129@users.noreply.github.com> Date: Sun, 27 Dec 2020 21:01:35 +0200 Subject: Return Git SHA in index route --- backend/routes/index.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'backend/routes/index.py') diff --git a/backend/routes/index.py b/backend/routes/index.py index dd40d01..2551c58 100644 --- a/backend/routes/index.py +++ b/backend/routes/index.py @@ -7,6 +7,7 @@ from spectree import Response from starlette.requests import Request from starlette.responses import JSONResponse +from backend.constants import GIT_SHA from backend.route import Route from backend.validation import api @@ -19,6 +20,9 @@ class IndexResponse(BaseModel): " be an IP of our internal load balancer" ) ) + sha: str = Field( + description="Current release Git SHA in production." + ) class IndexRoute(Route): @@ -41,7 +45,8 @@ class IndexRoute(Route): "client": request.client.host, "user": { "authenticated": False - } + }, + "sha": GIT_SHA } if request.user.is_authenticated: -- cgit v1.2.3