diff --git a/CHANGELOG.md b/CHANGELOG.md index 2087fec..5c2647f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `laravel-surveyhero` will be documented in this file. +## v1.3.5 - 2022-10-19 + +- Add collectors to mapping command +- Fix mapping command formatting when mapping multiple surveys + ## 1.3.4 - 2022-09-30 Support for answer_mapping to subquestions of choice_table type. diff --git a/src/Http/SurveyheroClient.php b/src/Http/SurveyheroClient.php index 2ef1d15..0142281 100644 --- a/src/Http/SurveyheroClient.php +++ b/src/Http/SurveyheroClient.php @@ -50,6 +50,7 @@ public function getSurveyQuestions(string|int $surveyId, string $lang = null): a public function getSurveyCollectors(string|int $surveyId): ?array { $collectorData = $this->fetchFromSurveyHero(sprintf('surveys/%s/collectors', $surveyId)); + return $collectorData->successful() ? json_decode($collectorData->body())->collectors : null; }