refactor health module

This commit is contained in:
Philipinho
2024-07-05 18:59:26 +01:00
parent 9496ec9b57
commit 35dcd5f254
9 changed files with 261 additions and 33 deletions

View File

@ -38,7 +38,8 @@ async function bootstrap() {
.addHook('preHandler', function (req, reply, done) {
if (
req.originalUrl.startsWith('/api') &&
!req.originalUrl.startsWith('/api/auth/setup')
!req.originalUrl.startsWith('/api/auth/setup') &&
!req.originalUrl.startsWith('/api/health')
) {
if (!req.raw?.['workspaceId']) {
throw new NotFoundException('Workspace not found');