From b5dc47c8a7b9cf055b2ee765e206d8b3ac0e7ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=BC=E3=83=BC=E3=83=AC?= Date: Sat, 3 May 2025 18:59:03 +0500 Subject: [PATCH] Update profile.js --- api/v1/src/profile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/v1/src/profile.js b/api/v1/src/profile.js index 4bcbb66..922583d 100644 --- a/api/v1/src/profile.js +++ b/api/v1/src/profile.js @@ -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 { // Ошибку загрузки ролей игнорируем