From 998e4c4336653b9a73552b45b07dc62009d5d6e9 Mon Sep 17 00:00:00 2001 From: andrey Date: Tue, 15 Jun 2021 12:58:58 +0300 Subject: [PATCH] fix api responce --- backend/modules/settings/models/SkillsOnMainPageForm.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/modules/settings/models/SkillsOnMainPageForm.php b/backend/modules/settings/models/SkillsOnMainPageForm.php index ac3c647..4a7cb62 100644 --- a/backend/modules/settings/models/SkillsOnMainPageForm.php +++ b/backend/modules/settings/models/SkillsOnMainPageForm.php @@ -44,19 +44,19 @@ class SkillsOnMainPageForm extends Model if ($this->skills_back) { $res['SkillsOnMainPageForm']['skills_back'] = $this->skills_back; foreach ($this->skills_back as $item) { - $resToFront['skills_back'][] = [$item => \common\models\Skill::getNameById($item)]; + $resToFront['skills_back'][] = ['id' => $item, 'tags' => \common\models\Skill::getNameById($item)]; } } if ($this->skills_front) { $res['SkillsOnMainPageForm']['skills_front'] = $this->skills_front; foreach ($this->skills_front as $item) { - $resToFront['skills_front'][] = [$item => \common\models\Skill::getNameById($item)]; + $resToFront['skills_front'][] = ['id' => $item, 'tags' => \common\models\Skill::getNameById($item)]; } } if ($this->skills_design) { $res['SkillsOnMainPageForm']['skills_design'] = $this->skills_design; foreach ($this->skills_design as $item) { - $resToFront['skills_design'][] = [$item => \common\models\Skill::getNameById($item)]; + $resToFront['skills_design'][] = ['id' => $item, 'tags' => \common\models\Skill::getNameById($item)]; } }