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