Update profile.js
This commit is contained in:
@@ -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 {
|
||||
// Ошибку загрузки ролей игнорируем
|
||||
|
||||
Reference in New Issue
Block a user