mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
ApiVisualEditor: Move RESTbase initiation from construct() to execute()
There's no need e.g. in API documention queries to actually create the RESTbase service connection, and it's quite an expensive operation to do there. Change-Id: I114fe0718338db7233ed94e4ffa90861b4e9ff50
This commit is contained in:
parent
54fc920622
commit
fa2efb9e50
|
@ -25,7 +25,6 @@ class ApiVisualEditor extends ApiBase {
|
|||
parent::__construct( $main, $name );
|
||||
$this->veConfig = $config;
|
||||
$this->serviceClient = new VirtualRESTServiceClient( new MultiHttpClient( [] ) );
|
||||
$this->serviceClient->mount( '/restbase/', $this->getVRSObject() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -181,6 +180,8 @@ class ApiVisualEditor extends ApiBase {
|
|||
}
|
||||
|
||||
public function execute() {
|
||||
$this->serviceClient->mount( '/restbase/', $this->getVRSObject() );
|
||||
|
||||
$user = $this->getUser();
|
||||
$params = $this->extractRequestParams();
|
||||
|
||||
|
|
Loading…
Reference in a new issue