Update profile.js
This commit is contained in:
@@ -18,14 +18,17 @@ async function getProfileFromAnixart(profileId, token = '') {
|
|||||||
const verifiedResponse = await axios.get('https://anixart.seele.su/api/is_verified');
|
const verifiedResponse = await axios.get('https://anixart.seele.su/api/is_verified');
|
||||||
const verifiedList = verifiedResponse.data;
|
const verifiedList = verifiedResponse.data;
|
||||||
|
|
||||||
if (Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) {
|
const alreadyVerified = !!profileData.profile.is_verified;
|
||||||
|
|
||||||
|
if (!alreadyVerified && Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) {
|
||||||
profileData.profile.is_verified = true;
|
profileData.profile.is_verified = true;
|
||||||
} else {
|
}
|
||||||
|
// Если уже верифицирован — не затираем
|
||||||
|
} catch {
|
||||||
|
// Если профиль уже верифицирован — оставляем, иначе false
|
||||||
|
if (typeof profileData.profile.is_verified !== 'boolean') {
|
||||||
profileData.profile.is_verified = false;
|
profileData.profile.is_verified = false;
|
||||||
}
|
}
|
||||||
} catch {
|
|
||||||
// Ошибку верификации игнорируем
|
|
||||||
profileData.profile.is_verified = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Подгружаем кастомные роли
|
// Подгружаем кастомные роли
|
||||||
|
|||||||
Reference in New Issue
Block a user