1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Use Routes extender

This commit is contained in:
Franz Liedke
2018-02-08 18:25:58 +01:00
parent bb92a80585
commit 9480a26a84
2 changed files with 3 additions and 11 deletions

View File

@@ -13,8 +13,6 @@ namespace Flarum\Pusher\Listener;
use Flarum\Api\Event\Serializing;
use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Event\ConfigureApiRoutes;
use Flarum\Pusher\Api\Controller\AuthController;
use Flarum\Settings\SettingsRepositoryInterface;
use Illuminate\Contracts\Events\Dispatcher;
@@ -39,7 +37,6 @@ class AddPusherApi
public function subscribe(Dispatcher $events)
{
$events->listen(Serializing::class, [$this, 'addAttributes']);
$events->listen(ConfigureApiRoutes::class, [$this, 'addRoutes']);
}
/**
@@ -52,12 +49,4 @@ class AddPusherApi
$event->attributes['pusherCluster'] = $this->settings->get('flarum-pusher.app_cluster');
}
}
/**
* @param ConfigureApiRoutes $event
*/
public function addRoutes(ConfigureApiRoutes $event)
{
$event->post('/pusher/auth', 'pusher.auth', AuthController::class);
}
}