3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Fix "JSON Example (multiple values)" in sensor asset and data streams.

This was being overridden by the "Example CURL command" content.
This commit is contained in:
Michael Stenta 2022-01-17 06:34:35 -05:00
parent 2aac4f14e0
commit 6411dfa6ca
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ function farm_sensor_asset_view_alter(array &$build, AssetInterface $asset, Enti
// Render example CURL command.
$curl_example = 'curl -H "Content-Type: application/json" -X POST -d \'' . $json_example . '\' ' . $url_string;
$curl_example_label = t('Example CURL command');
$build['api']['json_example_multiple'] = [
$build['api']['curl_example'] = [
'#markup' => '<p><strong>' . $curl_example_label . ':</strong> ' . $curl_example . '</p>',
];
}

View file

@ -74,7 +74,7 @@ function data_stream_data_stream_view_alter(array &$build, DataStreamInterface $
// Render example CURL command.
$curl_example = 'curl -H "Content-Type: application/json" -X POST -d \'' . $json_example . '\' ' . $url_string;
$curl_example_label = t('Example CURL command');
$build['api']['json_example_multiple'] = [
$build['api']['curl_example'] = [
'#markup' => '<p><strong>' . $curl_example_label . ':</strong> ' . $curl_example . '</p>',
];
}