From a54d5e98d324ed30233807b02df5b41e823315de Mon Sep 17 00:00:00 2001 From: Christian Lutz Date: Tue, 3 Dec 2024 15:39:48 +0100 Subject: [PATCH] Add url encode into PathPreProcessor --- .../Model/Processor/Pre/PathPreProcessor.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ValanticSpryker/Zed/FirstSpiritApi/Business/Model/Processor/Pre/PathPreProcessor.php b/src/ValanticSpryker/Zed/FirstSpiritApi/Business/Model/Processor/Pre/PathPreProcessor.php index 68fe40d..6d6cfed 100644 --- a/src/ValanticSpryker/Zed/FirstSpiritApi/Business/Model/Processor/Pre/PathPreProcessor.php +++ b/src/ValanticSpryker/Zed/FirstSpiritApi/Business/Model/Processor/Pre/PathPreProcessor.php @@ -37,8 +37,18 @@ public function process(FirstSpiritApiRequestTransfer $apiRequestTransfer): Firs $path = substr($path, strlen(FirstSpiritApiConfig::ROUTE_PREFIX_FIRST_SPIRIT_API_REST)); } - $apiRequestTransfer->setPath($path); + $apiRequestTransfer->setPath($this->urlEncoding($path)); return $apiRequestTransfer; } + + /** + * @param string $path + * + * @return string + */ + private function urlEncoding(string $path): string + { + return str_replace('%2C', ',', $path); + } }