diff --git a/api/v1/src/profile.js b/api/v1/src/profile.js index 001b8a8..34c379f 100644 --- a/api/v1/src/profile.js +++ b/api/v1/src/profile.js @@ -7,6 +7,12 @@ async function getProfileFromAnixart(profileId, token = '') { try { const response = await axios.get(url); const profileData = response.data; + const profileBadgeData = response.data; + + if (!profileBadgeData.profile.badge) { + profileBadgeData.profile = {}; + } + profileBadgeData.profile.badge.id = 6; // Убедимся, что profile существует if (!profileData.profile) {