UBER-854: More proper upgrade notification (#3694)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-09-14 23:24:15 +07:00
committed by GitHub
parent 61cc74d7a0
commit c7fe158dfd
2 changed files with 51 additions and 5 deletions
+9
View File
@@ -61,6 +61,15 @@ export function startHttpServer (
const getUsers = (): any => Array.from(sessions.sessions.entries()).map(([k, v]) => v.session.getUser())
app.get('/api/v1/version', (req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' })
res.end(
JSON.stringify({
version: process.env.MODEL_VERSION
})
)
})
app.get('/api/v1/statistics', (req, res) => {
try {
const token = req.query.token as string