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 });