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

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

@@ -4,6 +4,7 @@ const logger = require('../utils/logger');
const EmailBotService = require('./emailBot.js');
const db = require('../db');
const authService = require('./auth-service');
const { checkAdminRole } = require('./admin-role');
class EmailAuth {
constructor() {
@@ -167,7 +168,7 @@ class EmailAuth {
const linkedWallet = await authService.getLinkedWallet(finalUserId);
if (linkedWallet) {
logger.info(`[checkEmailVerification] Found linked wallet ${linkedWallet} for user ${finalUserId}. Checking admin role...`);
const isAdmin = await authService.checkAdminRole(linkedWallet);
const isAdmin = await checkAdminRole(linkedWallet);
userRole = isAdmin ? 'admin' : 'user';
logger.info(`[checkEmailVerification] Role for user ${finalUserId} determined as: ${userRole}`);