Add contact/batch route
This commit is contained in:
parent
3785c6de05
commit
9ff0d56e03
|
@ -92,7 +92,7 @@ class Router
|
|||
$this->routeCollector->addRoute(['GET'], '/bookmarklet', Module\Bookmarklet::class);
|
||||
$this->routeCollector->addGroup('/contact', function (RouteCollector $collector) {
|
||||
$collector->addRoute(['GET'], '[/]', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/{id:\d+}[/]', Module\Contact::class);
|
||||
$collector->addRoute(['GET', 'POST'], '/{id:\d+}[/]', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/{id:\d+}/archive', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/{id:\d+}/block', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/{id:\d+}/conversations', Module\Contact::class);
|
||||
|
@ -103,6 +103,7 @@ class Router
|
|||
$collector->addRoute(['GET'], '/{id:\d+}/updateprofile', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/all', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/archived', Module\Contact::class);
|
||||
$collector->addRoute(['GET', 'POST'], '/batch', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/blocked', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/hidden', Module\Contact::class);
|
||||
$collector->addRoute(['GET'], '/ignored', Module\Contact::class);
|
||||
|
|
|
@ -177,11 +177,13 @@ class Contact extends BaseModule
|
|||
return;
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
if ($a->argv[1] === 'batch') {
|
||||
self::batchActions($a);
|
||||
return;
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
$contact_id = intval($a->argv[1]);
|
||||
if (!$contact_id) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue