Merge pull request #2 from philskents/addStartingMessage

Added starting message to verify pushover config
This commit is contained in:
Phil Skentelbery
2017-11-14 20:20:34 -06:00
committed by GitHub

View File

@@ -183,6 +183,11 @@ function displayStoresAvailable(storesAvailable) {
console.log(storesAvailableStr); console.log(storesAvailableStr);
} }
// Build start message
const kickoff = {
message: 'Starting iPhone X hunt',
}
// Build the message // Build the message
const msg = { const msg = {
message: 'iPhone X stock available nearby!', message: 'iPhone X stock available nearby!',
@@ -197,6 +202,12 @@ const msg = {
* *
* Continuously check for the device availability until it is available somewhere. * Continuously check for the device availability until it is available somewhere.
*/ */
p.send (kickoff, function (err, result){
if (err) {
throw err;
}
})
async function requestLoop() { async function requestLoop() {
// Fetch the storesAvailable array. // Fetch the storesAvailable array.
const storesAvailable = await getStoresAvailable(); const storesAvailable = await getStoresAvailable();