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 { try {
const rolesResponse = await axios.get('https://anixart.seele.su/api/is_roles'); const rolesResponse = await axios.get('https://anixart.seele.su/api/is_roles');
const rolesList = rolesResponse.data; const rolesList = rolesResponse.data;
const userRoles = rolesList.find(entry => entry.id === Number(profileId)); const userRoles = rolesList.find(entry => entry.id === Number(profileId));
if (userRoles && Array.isArray(userRoles.roles)) { if (userRoles && Array.isArray(userRoles.role)) {
profileData.profile.roles = userRoles.roles; profileData.profile.roles = userRoles.role;
} }
} catch { } catch {
// Ошибку загрузки ролей игнорируем // Ошибку загрузки ролей игнорируем