async function updateUsersPushNotifications(user, upload){

  // find all subs of people who are subbed to the current user
  const pushSubscriptions = await PushSubscription.find({
    subscribedToUser : user._id,
    active: true
  });

  // loop through all the user's subs
  for(const sub of pushSubscriptions){
    // console.log(sub.subscribingUser);

    let url, icon, image = '';

    url = `/user/${user.channelUrl}/${upload.uniqueTag}`;

    const uploadedImage = `/uploads/${user.channelUrl}/${upload.uniqueTag}.jpg`;

    const pushTitle = `New upload by: ${user.channelName || user.channelUrl}: ${upload.title}`

    const pushPayload = `url=${url}&$description=${upload.description}&image${uploadedImage}&icon=${uploadedImage}&title=${pushTitle}&description=${upload.description}`;


    const endpoints = await PushEndpoint.find({
      user: sub.subscribingUser,
      expired: false
    })

    for(const endpoint of endpoints){
      try {
        pushNotificationLib.sendPushNotification(endpoint.subscription, pushPayload);
      } catch (err){
        console.log(err);
      }
    }



  }

  //
  // console.log(pushSubscriptions);
  //
  // console.log('push subscriptions');
  //
  // return
  //
  //
  //
  // // TODO: push notification functionality
  // const pushEndpoints = await PushEndpoint.find({ user, expired: false });
  //
  // console.log(pushEndpoints);
  //
  // let url, icon, image = '';
  //
  // url = `/user/channelUrl/${upload.uniqueTag}`;
  //
  // const uploadedImage = `/uploads/${user.channelUrl}/${upload.uniqueTag}.jpg`;
  //
  // const pushTitle = `New upload by: ${user.channelUrl}: ${upload.title}`
  //
  // const pushPayload = `url=${url}&$description=${upload.description}&image${uploadedImage}&icon=${uploadedImage}&title=${pushTitle}&description=${upload.description}`;
  //
  // for(const endpoint of pushEndpoints){
  //   console.log(endpoint);
  //   console.log(pushPayload);
  //   pushNotificationLib.sendPushNotification(endpoint.subscription, pushPayload);
  // }
}
for all of the users of those push subscription, scroll through and hit their active *