29
0
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:
Nicola Galgano 2021-06-14 00:45:15 +02:00 committed by GitHub
parent 9f50586d98
commit 451dd59df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);