diff options
author | 2020-12-27 21:01:35 +0200 | |
---|---|---|
committer | 2020-12-27 21:01:35 +0200 | |
commit | 71969bc1f98439b0c3df60b1a46841875ca4851f (patch) | |
tree | 9e156168fb7d0ec7111f46488cb605021b9c1c71 /backend/routes/index.py | |
parent | Move Sentry middleware to higher position (diff) |
Return Git SHA in index route
Diffstat (limited to 'backend/routes/index.py')
-rw-r--r-- | backend/routes/index.py | 7 |
1 files changed, 6 insertions, 1 deletions
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: |