Update profile.js

This commit is contained in:
2025-05-03 18:59:03 +05:00
committed by GitHub
parent 9b48f8b048
commit b5dc47c8a7

View File

@@ -23,14 +23,14 @@ async function getProfileFromAnixart(profileId, token = '') {
// Ошибку верификации игнорируем
}
// Подгружаем кастомные роли по URL
// Подгружаем кастомные роли
try {
const rolesResponse = await axios.get('https://anixart.seele.su/api/is_roles');
const rolesList = rolesResponse.data;
const userRoles = rolesList.find(entry => entry.id === Number(profileId));
if (userRoles && Array.isArray(userRoles.roles)) {
profileData.profile.roles = userRoles.roles;
if (userRoles && Array.isArray(userRoles.role)) {
profileData.profile.roles = userRoles.role;
}
} catch {
// Ошибку загрузки ролей игнорируем