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