From cf39ac0defa754feca235f8dc1dc47339d284b08 Mon Sep 17 00:00:00 2001 From: derrickmehaffy Date: Wed, 26 Jul 2023 03:46:56 -0700 Subject: [PATCH] Handle #55 but need to test --- .../server/middlewares/purgeAdmin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/strapi-plugin-rest-cache/server/middlewares/purgeAdmin.js b/packages/strapi-plugin-rest-cache/server/middlewares/purgeAdmin.js index 483a4deed..5c2446194 100644 --- a/packages/strapi-plugin-rest-cache/server/middlewares/purgeAdmin.js +++ b/packages/strapi-plugin-rest-cache/server/middlewares/purgeAdmin.js @@ -29,7 +29,10 @@ function createPurgeAdmin(options, { strapi }) { if (!(ctx.status >= 200 && ctx.status <= 300)) return; - await cacheStore.clearByUid(uid, params); + await cacheStore.clearByUid(uid, { + ...params, + ...ctx.request.body, + }); }; }