From 3079908335545846e99f0cca8a6e5044053ac4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tangi=20Mend=C3=A8s?= Date: Fri, 20 Dec 2024 17:11:31 +0100 Subject: [PATCH] lbijn --- api/src/config.js | 2 +- api/src/index.js | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/api/src/config.js b/api/src/config.js index 551ddded..b44280ad 100644 --- a/api/src/config.js +++ b/api/src/config.js @@ -16,7 +16,7 @@ const DATABASE_URL = process.env.DATABASE_URL; const CRONJOBS_ENABLED = process.env.CRONJOBS_ENABLED === "true"; const PUSH_NOTIFICATION_GCM_ID = process.env.PUSH_NOTIFICATION_GCM_ID; -const PUSH_NOTIFICATION_APN_KEY = process.env.PUSH_NOTIFICATION_APN_KEY.replace(/\\n/g, "\n"); +const PUSH_NOTIFICATION_APN_KEY = process.env.PUSH_NOTIFICATION_APN_KEY?.replace(/\\n/g, "\n"); const PUSH_NOTIFICATION_APN_KEY_ID = process.env.PUSH_NOTIFICATION_APN_KEY_ID; const PUSH_NOTIFICATION_APN_TEAM_ID = process.env.PUSH_NOTIFICATION_APN_TEAM_ID; diff --git a/api/src/index.js b/api/src/index.js index d2dc45af..f8fc5dd7 100644 --- a/api/src/index.js +++ b/api/src/index.js @@ -22,17 +22,11 @@ app.use(cors()); // kube probe app.get("/healthz", async (req, res) => { - res.send(`Hello World`); + res.status(200).send(); }); -app.get("/config", async (req, res) => { - res.send({ VERSION, MOBILE_VERSION, MOBILE_ANDROID_BUILD_NUMBER, MOBILE_IOS_BUILD_NUMBER }); -}); - -// hello world -const now = new Date(); app.get("/", async (req, res) => { - res.send(`api MSP • ${now.toISOString()}`); + res.send({ VERSION, MOBILE_VERSION, MOBILE_ANDROID_BUILD_NUMBER, MOBILE_IOS_BUILD_NUMBER }); }); // Add header with API version to compare with client.