cleanup
This commit is contained in:
@@ -6,5 +6,4 @@ Dockerfile
|
|||||||
.gitignore
|
.gitignore
|
||||||
README.md
|
README.md
|
||||||
*.example
|
*.example
|
||||||
.env.example
|
|
||||||
.labels.example
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const port = process.env.PORT || 3000;
|
|||||||
const vapidPublicKey = process.env.VAPID_PUBLIC_KEY;
|
const vapidPublicKey = process.env.VAPID_PUBLIC_KEY;
|
||||||
const vapidPrivateKey = process.env.VAPID_PRIVATE_KEY;
|
const vapidPrivateKey = process.env.VAPID_PRIVATE_KEY;
|
||||||
const vapidSubject = process.env.VAPID_SUBJECT; // mailto: or https:
|
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';
|
const defaultButtonName = process.env.DEFAULT_BUTTON_NAME || 'game-button';
|
||||||
// Basic Authentication Credentials
|
// Basic Authentication Credentials
|
||||||
const basicAuthUsername = process.env.BASIC_AUTH_USERNAME;
|
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.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
|
// Basic validation
|
||||||
if (!click_type) {
|
if (!click_type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user