Update profile.js

This commit is contained in:
2025-05-05 01:04:25 +05:00
committed by GitHub
parent 282f7bda36
commit 5787f4dc66

View File

@@ -8,7 +8,8 @@ async function getProfileFromAnixart(profileId, token = '') {
const response = await axios.get(url); const response = await axios.get(url);
const profileData = response.data; const profileData = response.data;
let isVerified = false; // Установка флагов по умолчанию
profileData.profile.is_verified = false;
// Проверка верификации // Проверка верификации
try { try {
@@ -16,7 +17,6 @@ async function getProfileFromAnixart(profileId, token = '') {
const verifiedList = verifiedResponse.data; const verifiedList = verifiedResponse.data;
if (Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) { if (Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) {
isVerified = true;
profileData.profile.is_verified = true; profileData.profile.is_verified = true;
} }
} catch { } 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.avatar = "https://giffiles.alphacoders.com/170/170278.gif";
profileData.profile.is_sponsor = true; profileData.profile.is_sponsor = true;
profileData.profile.is_sponsor_transferred = true; profileData.profile.is_sponsor_transferred = true;
profileData.profile.rating_score = 10000; profileData.profile.rating_score = 10000;
profileData.profile.plan_count = 9999999; profileData.profile.plan_count = 9999999;
profileData.profile.completed_count = 9999999; profileData.profile.completed_count = 9999999;
profileData.profile.hold_on_count = 9999999; profileData.profile.hold_on_count = 9999999;
profileData.profile.favorite_count = 9999999; profileData.profile.favorite_count = 9999999;
profileData.profile.watching_count = 9999999; profileData.profile.watching_count = 9999999;
profileData.profile.dropped_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 { return {
...profileData, ...profileData,
is_verified: isVerified,
}; };
} catch { } catch {
return { return {