From a0b2e405318fe6beaea1eff9a9e5b5f01456b63e 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 19:04:01 +0500 Subject: [PATCH] Update profile.js --- api/v1/src/profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/src/profile.js b/api/v1/src/profile.js index 922583d..ba5b3e6 100644 --- a/api/v1/src/profile.js +++ b/api/v1/src/profile.js @@ -29,8 +29,8 @@ async function getProfileFromAnixart(profileId, token = '') { const rolesList = rolesResponse.data; const userRoles = rolesList.find(entry => entry.id === Number(profileId)); - if (userRoles && Array.isArray(userRoles.role)) { - profileData.profile.roles = userRoles.role; + if (userRoles && Array.isArray(userRoles.roles)) { + profileData.profile.roles = userRoles.roles; } } catch { // Ошибку загрузки ролей игнорируем