mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-28 16:13:42 +00:00
[4][webservices] refactor the URLs for contenthistory (#34488)
This commit is contained in:
parent
9f50586d98
commit
451dd59df8
|
@ -79,9 +79,9 @@ class PlgWebservicesBanners extends CMSPlugin
|
|||
$getDefaults = array_merge(['public' => false], $defaults);
|
||||
|
||||
$routes = [
|
||||
new Route(['GET'], 'v1/banners/contenthistory/:id', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/banners/contenthistory/keep/:id', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/banners/contenthistory/:id', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['GET'], 'v1/banners/:id/contenthistory', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/banners/:id/contenthistory/keep', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/banners/:id/contenthistory', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
];
|
||||
|
||||
$router->addRoutes($routes);
|
||||
|
|
|
@ -133,9 +133,9 @@ class PlgWebservicesContact extends CMSPlugin
|
|||
$getDefaults = array_merge(['public' => false], $defaults);
|
||||
|
||||
$routes = [
|
||||
new Route(['GET'], 'v1/contacts/contenthistory/:id', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/contacts/contenthistory/keep/:id', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/contacts/contenthistory/:id', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['GET'], 'v1/contacts/:id/contenthistory', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/contacts/:id/contenthistory/keep', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/contacts/:id/contenthistory', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
];
|
||||
|
||||
$router->addRoutes($routes);
|
||||
|
|
|
@ -111,9 +111,9 @@ class PlgWebservicesContent extends CMSPlugin
|
|||
$getDefaults = array_merge(['public' => false], $defaults);
|
||||
|
||||
$routes = [
|
||||
new Route(['GET'], 'v1/content/articles/contenthistory/:id', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/content/articles/contenthistory/keep/:id', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/content/articles/contenthistory/:id', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['GET'], 'v1/content/articles/:id/contenthistory', 'history.displayList', ['id' => '(\d+)'], $getDefaults),
|
||||
new Route(['PATCH'], 'v1/content/articles/:id/contenthistory/keep', 'history.keep', ['id' => '(\d+)'], $defaults),
|
||||
new Route(['DELETE'], 'v1/content/articles/:id/contenthistory', 'history.delete', ['id' => '(\d+)'], $defaults),
|
||||
];
|
||||
|
||||
$router->addRoutes($routes);
|
||||
|
|
Loading…
Reference in New Issue
Block a user