From d32a7dc54e3e49e8a4b153c0b302e19f484cc5fc Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 8 Oct 2025 22:43:24 +0300 Subject: [PATCH] fix registration error --- apps/bot/src/bot/features/registration.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/bot/src/bot/features/registration.ts b/apps/bot/src/bot/features/registration.ts index 658d850..d00164c 100644 --- a/apps/bot/src/bot/features/registration.ts +++ b/apps/bot/src/bot/features/registration.ts @@ -3,7 +3,6 @@ import { logHandle } from '@/bot/helpers/logging'; import { KEYBOARD_REMOVE, mainMenu } from '@/config/keyboards'; import { parseContact } from '@/utils/contact'; import { isValidPhoneNumber, normalizePhoneNumber } from '@/utils/phone'; -import { CustomersService } from '@repo/graphql/api/customers'; import { RegistrationService } from '@repo/graphql/api/registration'; import { Composer } from 'grammy'; @@ -18,8 +17,8 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { const { name, surname } = parseContact(contact); // Проверяем, не зарегистрирован ли уже пользователь - const customerService = new CustomersService({ telegramId }); - const { customer: existingCustomer } = await customerService.getCustomer({ telegramId }); + const registrationService = new RegistrationService(); + const { customer: existingCustomer } = await registrationService.getCustomer({ telegramId }); if (existingCustomer) { return ctx.reply(ctx.t('msg-already-registered'), { @@ -39,8 +38,6 @@ feature.on(':contact', logHandle('contact-registration'), async (ctx) => { return ctx.reply(ctx.t('msg-invalid-phone')); } - const registrationService = new RegistrationService(); - try { const { customer } = await registrationService.getCustomer({ phone });