Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/includes/BookRenderingMediator.php b/includes/BookRenderingMediator.php
index 9d30550..400aec7 100644
--- a/includes/BookRenderingMediator.php
+++ b/includes/BookRenderingMediator.php
@@ -192,10 +192,7 @@ class BookRenderingMediator implements LoggerAwareInterface {
'electron' => ElectronVirtualRestService::class,
];
foreach ( $modules as $module => $class ) {
- if ( !isset( $config['modules'][$module] ) ) {
- throw new Exception( "VirtualRESTService module $module is not configured propely" );
- }
- $params = $config['modules'][$module];
+ $params = [];
if ( isset( $config['global'] ) ) {
$params += $config['global'];
}
diff --git a/includes/DataProvider.php b/includes/DataProvider.php
index 7e5cd5c..7c54cc6 100644
--- a/includes/DataProvider.php
+++ b/includes/DataProvider.php
@@ -59,10 +59,8 @@ class DataProvider implements LoggerAwareInterface {
$linkBatch->execute();
$requests = array_map( function ( array $item, Title $title ) {
- $url = '/restbase/local/v1/page/html/' . wfUrlencode( $title->getPrefixedDBkey() );
- if ( isset( $item['revision'] ) ) {
- $url .= '/' . $item['revision'];
- }
+ $url = 'http://localhost:8080/api/rest_v1/page/html/' . wfUrlencode( $title->getPrefixedDBkey() );
+
return [
'method' => 'GET',
'url' => $url,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.