Update profile.js
This commit is contained in:
@@ -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,8 +36,7 @@ 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;
|
||||||
@@ -50,9 +49,16 @@ async function getProfileFromAnixart(profileId, token = '') {
|
|||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user