Skip to content

Commit 46cea56

Browse files
committed
move the configuration to /config
1 parent b4af51d commit 46cea56

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

app/Http/Controllers/Backend/MediawikiHostMapController.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class MediawikiHostMapController extends Controller {
1010
public function getWikiVersionToHostMapForDomain(Request $request): \Illuminate\Http\JsonResponse
1111
{
12+
1213
$domain = $request->query('domain');
1314
$wikiDbVersion = Wiki::where('domain', $domain)
1415
->whereNull('deleted_at')
@@ -19,10 +20,7 @@ public function getWikiVersionToHostMapForDomain(Request $request): \Illuminate\
1920
if (is_null($wikiDbVersion)) {
2021
abort(401);
2122
}
22-
$mwDbToHostMap = [
23-
'mw1.39-wbs1' => '139-app',
24-
'mw1.43-wbs1' => '143-app'
25-
];
23+
$mwDbToHostMap = require ('../../../../config/mediawiki-host.php');
2624

2725
return response()
2826
->json([

config/mediawiki-host.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
//
4+
return [
5+
'mw1.39-wbs1' => '139',
6+
'mw1.43-wbs1' => '143'
7+
];

0 commit comments

Comments
 (0)