Skip to content
Snippets Groups Projects
Commit 614c2ea4 authored by Gordon Heydon's avatar Gordon Heydon Committed by bartvig
Browse files

Issue #3381807: Settings form is not accessing config correctly.

parent 60484847
No related branches found
No related tags found
1 merge request!18Issue #3381807: Settings form is not accessing config correctly.
......@@ -124,7 +124,7 @@ class SettingsForm extends ConfigFormBase {
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->configFactory->get('siteimprove.settings');
$config = $this->config('siteimprove.settings');
$form['container'] = [
'#title' => $this->t('Token'),
......@@ -249,10 +249,12 @@ class SettingsForm extends ConfigFormBase {
];
if ($config->get('prepublish_enabled')) {
$full_config = $this->configFactory->get('siteimprove.settings');
// Check API if prepublish checking has been enabled.
$url = 'https://api.siteimprove.com/v2/settings/content_checking';
$res = $this->httpClient->request('GET', $url, [
'auth' => [$config->get('api_username'), $config->get('api_key')],
'auth' => [$full_config->get('api_username'), $full_config->get('api_key')],
'headers' => [
'Accept' => 'application/json',
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment