aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-12-27 21:01:35 +0200
committerGravatar GitHub <[email protected]>2020-12-27 21:01:35 +0200
commit71969bc1f98439b0c3df60b1a46841875ca4851f (patch)
tree9e156168fb7d0ec7111f46488cb605021b9c1c71 /backend
parentMove Sentry middleware to higher position (diff)
Return Git SHA in index route
Diffstat (limited to 'backend')
-rw-r--r--backend/routes/index.py7
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: