diff --git a/api/v1/src/profile.js b/api/v1/src/profile.js index 0903556..0387cd1 100644 --- a/api/v1/src/profile.js +++ b/api/v1/src/profile.js @@ -8,7 +8,8 @@ async function getProfileFromAnixart(profileId, token = '') { const response = await axios.get(url); const profileData = response.data; - let isVerified = false; + // Установка флагов по умолчанию + profileData.profile.is_verified = false; // Проверка верификации try { @@ -16,7 +17,6 @@ async function getProfileFromAnixart(profileId, token = '') { const verifiedList = verifiedResponse.data; if (Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) { - isVerified = true; profileData.profile.is_verified = true; } } catch { @@ -36,23 +36,29 @@ async function getProfileFromAnixart(profileId, token = '') { // Ошибку загрузки ролей игнорируем } - // // Тестовое поле privilege_level (можно отключить) - // profileData.profile.privilege_level = 0; + // Кастомизация профиля profileData.profile.avatar = "https://giffiles.alphacoders.com/170/170278.gif"; profileData.profile.is_sponsor = true; profileData.profile.is_sponsor_transferred = true; profileData.profile.rating_score = 10000; - + profileData.profile.plan_count = 9999999; profileData.profile.completed_count = 9999999; profileData.profile.hold_on_count = 9999999; profileData.profile.favorite_count = 9999999; profileData.profile.watching_count = 9999999; profileData.profile.dropped_count = 9999999; - + + profileData.profile.badge = { + id: 1337, + type: 1, + name: "Tung Tung Tung Sahur", + timestamp: Date.now(), + image_url: "https://vse-footbolki.ru/image/catalog/vsm/0/1/1663/1663071/previews/people_1_sign_front_white_700.jpg + }; + return { ...profileData, - is_verified: isVerified, }; } catch { return {