diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index d21f498..33a29d5 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -243,7 +243,7 @@ class Plugin extends Model } // Response doesn't seem to be JSON, wrap the response body text as a JSON object - return ['text' => $httpResponse->body()]; + return ['data' => $httpResponse->body()]; } catch (Exception $e) { Log::warning('Failed to parse JSON response: '.$e->getMessage()); diff --git a/tests/Feature/PluginXmlResponseTest.php b/tests/Feature/PluginXmlResponseTest.php index 9717d8d..5811089 100644 --- a/tests/Feature/PluginXmlResponseTest.php +++ b/tests/Feature/PluginXmlResponseTest.php @@ -113,7 +113,7 @@ test('plugin wraps plain text response body as JSON', function (): void { $plugin->refresh(); expect($plugin->data_payload)->toBe([ - 'text' => 'Lorem ipsum dolor sit amet', + 'data' => 'Lorem ipsum dolor sit amet', ]); });