Compare commits
2 Commits
addPushNot
...
addStartin
Author | SHA1 | Date | |
---|---|---|---|
d12719be22 | |||
382e3dce31 |
11
index.js
11
index.js
@ -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();
|
||||||
|
Reference in New Issue
Block a user