Remove additional v1 suffix when computing internalRestbaseURL

Remove additional /v1 when computing internalRestbaseURL from
virtualRestConfig as this will be added in getUrl in MathRestbaseInterface.

internalRestbaseURL was introduced in I2fbc441955a1fe417f264f31f3729ce0715f7f16.

Bug: T334842
Bug: T338381
Change-Id: If2719fb9106e1414ce8814a2fbafa5dcedb84e39
(cherry picked from commit 7c7b3324be)
This commit is contained in:
Moritz Schubotz (physikerwelt) 2023-06-08 03:05:08 +02:00 committed by Samtar
parent 3263379318
commit 4dec9419f1
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ class Hooks {
$restBaseDomain
);
$internalRestbaseURL = "$restBaseUrl/$restBaseDomain/v1/";
$internalRestbaseURL = "$restBaseUrl/$restBaseDomain/";
} else {
// Default to using the external URL for internal calls as well.
$internalRestbaseURL = $fullRestbaseUrl;

View file

@ -73,7 +73,7 @@ class HooksTest extends MediaWikiUnitTestCase {
] + $defaults,
[
'MathFullRestbaseURL' => 'https://wikimedia.org/api/rest_',
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/v1/',
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/',
]
];
@ -86,7 +86,7 @@ class HooksTest extends MediaWikiUnitTestCase {
] + $defaults,
[
'MathFullRestbaseURL' => 'https://wikimedia.org/api/rest_',
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/v1/',
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/',
]
];