Skip to content

Conversation

@rosalieper
Copy link
Contributor

No description provided.

@rosalieper rosalieper marked this pull request as draft November 14, 2025 10:45
if (is_null($version)) {
abort(401);
}
$mapPath = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$mapPath = "";
$map = ["db-version" => "mw-version"];

if (!file_exists($mapPath)) {
throw new \Exception("MW host mapping file not found at {$mapPath}");
}
$host = "something from $mapPath";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$host = "something from $mapPath";
$host = $map[$domain]; // and throw if not in map, return 404 etc.

$router->group(['prefix' => 'ingress'], function () use ($router) {
// GET
$router->get('getWikiVersionForDomain', ['uses' => 'IngressController@getWikiVersionForDomain']);
$router->get('getWikiVersionToHostMapForDomain', ['uses' => 'MediawikiHostMapController@getWikiVersionToHostMapForDomain']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$router->get('getWikiVersionToHostMapForDomain', ['uses' => 'MediawikiHostMapController@getWikiVersionToHostMapForDomain']);
$router->get('getWikiVersionForDomainv2', ['uses' => 'MediawikiHostMapController@getWikiVersionToHostMapForDomain']);

how about this name just as a strawman?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants