Update profile.js
This commit is contained in:
@@ -8,8 +8,7 @@ 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 {
|
||||||
@@ -17,6 +16,7 @@ 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,12 +36,12 @@ async function getProfileFromAnixart(profileId, token = '') {
|
|||||||
// Ошибку загрузки ролей игнорируем
|
// Ошибку загрузки ролей игнорируем
|
||||||
}
|
}
|
||||||
|
|
||||||
// Кастомные поля
|
// // Тестовое поле privilege_level (можно отключить)
|
||||||
profileData.profile.avatar = "https://www.tophentaigallery.com/wp-content/uploads/2020/03/delicious-hentai-gif-xxx-1584367984kn4g8.gif";
|
// profileData.profile.privilege_level = 0;
|
||||||
profileData.profile.is_sponsor = true;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...profileData,
|
...profileData,
|
||||||
|
is_verified: isVerified,
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user