pwa/pwa.js
/**
         * Update the subscription to Push and send to Server API
         * @param  {Function} callback Return callback with boolean
         * @return {Boolean}
         */
Update the subscription to Push and send to Server API
@param  {Function} callback Return callback with boolean
@return {Boolean}
Update the subscription to Push and send to Server API @param { Function } callback Return callback with boolean @return { Boolean }
static updateSubscription(callback) {
            this.getSubscription((subscription) => {
                if (subscription) {
                    Server.sendSubscription(subscription, 'PUT');
                    console.log('PWA: Update the subscription to push service!');
                    callback(true);
                } else {
                    callback(false);
                }
            });
        }
static updateSubscription ( callback ) { this . getSubscription ( ( subscription ) => { if ( subscription ) { Server . sendSubscription ( subscription , 'PUT' ) ; console . log ( 'PWA: Update the subscription to push service!' ) ; callback ( true ) ; } else { callback ( false ) ; } } ) ; }
Update the subscription to Push and send to Server API
 @param  {Function} callback Return callback with boolean
 @return {Boolean}
Update the subscription to Push and send to Server API @param { Function } callback Return callback with boolean @return { Boolean }