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.