From 4f76bae18782dcf530111d5431dd2ea34436489d Mon Sep 17 00:00:00 2001 From: cpu Date: Fri, 28 Mar 2025 19:18:32 +0100 Subject: [PATCH] cleanup --- .dockerignore | 3 +-- server.js | 4 ++-- ...bpush.service => virt-flic-webhook-webpush.service.example | 0 3 files changed, 3 insertions(+), 4 deletions(-) rename virt-flic-webhook-webpush.service => virt-flic-webhook-webpush.service.example (100%) diff --git a/.dockerignore b/.dockerignore index f9beaeb..9319e10 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,5 +6,4 @@ Dockerfile .gitignore README.md *.example -.env.example -.labels.example + diff --git a/server.js b/server.js index 3d2e5c0..775967c 100644 --- a/server.js +++ b/server.js @@ -13,7 +13,7 @@ const port = process.env.PORT || 3000; const vapidPublicKey = process.env.VAPID_PUBLIC_KEY; const vapidPrivateKey = process.env.VAPID_PRIVATE_KEY; const vapidSubject = process.env.VAPID_SUBJECT; // mailto: or https: -const subscriptionsFilePath = process.env.SUBSCRIPTIONS_FILE || path.join(__dirname, 'subscriptions.json'); +const subscriptionsFilePath = process.env.SUBSCRIPTIONS_FILE || path.join(__dirname, '/app/subscriptions.json'); const defaultButtonName = process.env.DEFAULT_BUTTON_NAME || 'game-button'; // Basic Authentication Credentials const basicAuthUsername = process.env.BASIC_AUTH_USERNAME; @@ -291,7 +291,7 @@ app.get('/webhook/:click_type', authenticateBasic, async (req, res) => { logger.debug(` ${headerName}: ${req.headers[headerName]}`); }); - logger.info(`Received GET webhook: Button=${buttonName}, Type=${click_type}, Timestamp=${timestamp || 'N/A'}`); + logger.info(`Received GET webhook: Button=${buttonName}, Type=${click_type}, Battery=${batteryLevel}, Timestamp=${timestamp || 'N/A'}`); // Basic validation if (!click_type) { diff --git a/virt-flic-webhook-webpush.service b/virt-flic-webhook-webpush.service.example similarity index 100% rename from virt-flic-webhook-webpush.service rename to virt-flic-webhook-webpush.service.example