File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
app/Http/Controllers/Backend Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 77use Illuminate \Http \Request ;
88
99class WikiReadOnlyController extends Controller {
10+ public function setWikiReadonly (Request $ request ) {
1011
11- public function getWikiVersionForDomain (Request $ request ) {
12-
13- $ domain = $ request ->query ('domain ' );
12+ $ domain = $ request ->input ('domain ' );
1413 $ wiki = Wiki::where ('domain ' , $ domain )->first ();
1514
1615 if (!$ wiki ) {
1716 return response ()->json ([
18- 'error ' => 'Wiki not found for domain: ' . $ domain
17+ 'error ' => 'Wiki not found for domain: ' . $ domain,
1918 ], 404 );
2019 }
2120
2221 $ wiki ->setSetting ('wgReadOnly ' , 'This wiki is currently read-only. ' );
22+
2323 return response ()->json ([
2424 'success ' => true ,
2525 'domain ' => $ domain ,
2626 'message ' => 'Wiki set to read-only successfully. ' ,
2727 ]);
2828 }
29-
3029}
You can’t perform that action at this time.
0 commit comments