Skip to content

Commit 9c272ab

Browse files
kyteinskyjulien-nc
andauthored
fix: do not add /v1 twice to the service url (#207)
* fix: do not add /v1 twice to the service url Signed-off-by: Anupam Kumar <kyteinsky@gmail.com> * Update lib/Migration/Version030104Date20241011192830.php Co-authored-by: Julien Veyssier <julien-nc@posteo.net> Signed-off-by: Anupam Kumar <kyteinsky@gmail.com> * fix: use str_ends_with Signed-off-by: Anupam Kumar <kyteinsky@gmail.com> --------- Signed-off-by: Anupam Kumar <kyteinsky@gmail.com> Co-authored-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 0b83877 commit 9c272ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Migration/Version030104Date20241011192830.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
*/
2929
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
3030
$value = $this->openAiSettingsService->getServiceUrl();
31-
if ($value !== '') {
31+
if ($value !== '' && !str_ends_with(rtrim($value, '/ '), '/v1')) {
3232
$newValue = rtrim($value, '/') . '/v1';
3333
$this->openAiSettingsService->setServiceUrl($newValue);
3434
}

0 commit comments

Comments
 (0)