update migration scripts + update healthcheck + bump version

This commit is contained in:
mrjvs
2023-11-04 21:51:45 +01:00
parent b4e185d297
commit 241b1b1f47
2 changed files with 10 additions and 4 deletions

View File

@@ -5,13 +5,17 @@ import { makeRouter } from '@/services/router';
export const metaRouter = makeRouter((app) => {
app.get(
'/healthcheck',
handle(async ({ em }) => {
handle(async ({ em, res }) => {
const databaseConnected = await em.config
.getDriver()
.getConnection()
.isConnected();
const healthy = databaseConnected;
if (!healthy) res.status(503);
return {
healthy: databaseConnected,
healthy,
databaseConnected,
};
}),