Merge pull request #7115 from nupplaphil/bug/mod_contact_batch
Add contact/batch route
This commit is contained in:
commit
dcd602d02a
|
@ -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