cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user