From 6411dfa6ca7ec66fabe5375d4ff6f294464670f2 Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Mon, 17 Jan 2022 06:34:35 -0500 Subject: [PATCH] Fix "JSON Example (multiple values)" in sensor asset and data streams. This was being overridden by the "Example CURL command" content. --- modules/asset/sensor/farm_sensor.module | 2 +- modules/core/data_stream/data_stream.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/asset/sensor/farm_sensor.module b/modules/asset/sensor/farm_sensor.module index 686b34c0..1e37671b 100644 --- a/modules/asset/sensor/farm_sensor.module +++ b/modules/asset/sensor/farm_sensor.module @@ -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' => '

' . $curl_example_label . ': ' . $curl_example . '

', ]; } diff --git a/modules/core/data_stream/data_stream.module b/modules/core/data_stream/data_stream.module index fc10d1bf..9e10b778 100644 --- a/modules/core/data_stream/data_stream.module +++ b/modules/core/data_stream/data_stream.module @@ -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' => '

' . $curl_example_label . ': ' . $curl_example . '

', ]; }