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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user