From 03861af893ae40dbe37ddb01a897664a0e4e64f1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 23 Nov 2022 13:40:10 +0100 Subject: [PATCH] fix: nope in database strings --- apps/api/src/routes/api/v1/base/index.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/apps/api/src/routes/api/v1/base/index.ts b/apps/api/src/routes/api/v1/base/index.ts index 622a5aa4f..c0dfeb4b8 100644 --- a/apps/api/src/routes/api/v1/base/index.ts +++ b/apps/api/src/routes/api/v1/base/index.ts @@ -2,21 +2,14 @@ import { FastifyPluginAsync } from 'fastify'; import { errorHandler, listSettings, version } from '../../../../lib/common'; const root: FastifyPluginAsync = async (fastify): Promise => { - fastify.addHook('onRequest', async (request) => { - try { - return await request.jwtVerify(); - } catch(error){ - return {}; - } - }) - + fastify.addHook('onRequest', async (request) => await request.jwtVerify()); fastify.get('/', async (request) => { const teamId = request.user?.teamId; const settings = await listSettings() try { return { - ipv4: teamId ? settings.ipv4 : 'nope', - ipv6: teamId ? settings.ipv6 : 'nope', + ipv4: teamId ? settings.ipv4 : null, + ipv6: teamId ? settings.ipv6 : null, version, whiteLabeled: process.env.COOLIFY_WHITE_LABELED === 'true', whiteLabeledIcon: process.env.COOLIFY_WHITE_LABELED_ICON,