ваше сообщение коммита

This commit is contained in:
2025-05-28 14:23:38 +03:00
parent 1d6797fe1b
commit 093e599847
9 changed files with 221 additions and 6949 deletions

View File

@@ -1,6 +1,7 @@
const db = require('../db');
const logger = require('../utils/logger');
const { getLinkedWallet } = require('./wallet-service');
const { checkAdminRole } = require('./admin-role');
/**
* Сервис для работы с идентификаторами пользователей
@@ -545,7 +546,7 @@ class IdentityService {
const wallet = await getLinkedWallet(user.id);
let role = 'user';
if (wallet) {
const isAdmin = await authService.checkAdminRole(wallet);
const isAdmin = await checkAdminRole(wallet);
role = isAdmin ? 'admin' : 'user';
// Обновляем роль в users, если изменилась
if (user.role !== role) {