Skip to content
Snippets Groups Projects

Resolve #3534988 "Upgrade web push libs web push php"

19 files
+ 87
84
Compare changes
  • Side-by-side
  • Inline

Files

@@ -5,8 +5,6 @@ namespace Drupal\web_push\Controller;
use Drupal\Core\Cache\CacheableResponse;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Url;
use Drupal\web_push\Form\SettingsForm;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -17,6 +15,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class WebPushController extends ControllerBase {
/**
* The module handler service.
*
* @var \Drupal\Core\Extension\ModuleHandler
*/
protected $moduleHandler;
@@ -40,12 +40,11 @@ class WebPushController extends ControllerBase {
);
}
/**
* Get the service worker javascript handler.
*
* @return \Drupal\Core\Cache\CacheableResponse
* The service worker content.
* The service worker content.
*/
public function serviceWorker() {
// Get the actual module path.
@@ -57,9 +56,7 @@ class WebPushController extends ControllerBase {
'Content-Type' => 'application/javascript',
'Service-Worker-Allowed' => '/',
]);
// TODO add cache metadata
// $response->addCacheableDependency($cacheable_metadata);
// @todo add cache metadata
return $response;
}
Loading