From 7bd060ee4e92dafed9a9b3839a0bfaee4adf9c53 Mon Sep 17 00:00:00 2001 From: Mike Olund Date: Mon, 16 Feb 2026 17:58:21 -0800 Subject: [PATCH] =?UTF-8?q?Fix:=20Correct=20admin=20client=20URLs=20to=20m?= =?UTF-8?q?atch=20Strapi=C2=A05=20routes=20and=20fix=20404s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/src/components/PurgeCacheButton/index.jsx | 2 +- .../admin/src/components/PurgeDocumentAction/index.jsx | 2 +- .../plugin-rest-cache/admin/src/hooks/useCacheStrategy/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-rest-cache/admin/src/components/PurgeCacheButton/index.jsx b/packages/plugin-rest-cache/admin/src/components/PurgeCacheButton/index.jsx index be99869..f253769 100644 --- a/packages/plugin-rest-cache/admin/src/components/PurgeCacheButton/index.jsx +++ b/packages/plugin-rest-cache/admin/src/components/PurgeCacheButton/index.jsx @@ -36,7 +36,7 @@ function PurgeCacheButton({ contentType, params, wildcard = undefined, fullWidth // Show the loading state setIsModalConfirmButtonLoading(true); - await post(`/${pluginId}/purge`, { + await post(`/admin/${pluginId}/purge`, { contentType, params, wildcard, diff --git a/packages/plugin-rest-cache/admin/src/components/PurgeDocumentAction/index.jsx b/packages/plugin-rest-cache/admin/src/components/PurgeDocumentAction/index.jsx index b9a79a9..25dc6e8 100644 --- a/packages/plugin-rest-cache/admin/src/components/PurgeDocumentAction/index.jsx +++ b/packages/plugin-rest-cache/admin/src/components/PurgeDocumentAction/index.jsx @@ -60,7 +60,7 @@ function PurgeDocumentAction({ 'Are you sure you want to purge REST Cache for this entry?', })}, onConfirm: async () => { - await post(`/${pluginId}/purge`, { + await post(`/admin/${pluginId}/purge`, { contentType: model, params, wildcard: isSingleType, diff --git a/packages/plugin-rest-cache/admin/src/hooks/useCacheStrategy/index.js b/packages/plugin-rest-cache/admin/src/hooks/useCacheStrategy/index.js index bee1d4f..a739807 100644 --- a/packages/plugin-rest-cache/admin/src/hooks/useCacheStrategy/index.js +++ b/packages/plugin-rest-cache/admin/src/hooks/useCacheStrategy/index.js @@ -34,7 +34,7 @@ const useCacheStrategy = (shouldFetchData = true) => { type: 'GET_DATA', }); - const {data} = await get(`/${pluginId}/config/strategy`, { + const {data} = await get(`/admin/${pluginId}/config/strategy`, { signal, }); const strategy = data.strategy