diff --git a/packages/graphql/api/registration.ts b/packages/graphql/api/registration.ts index d65946c..120e95a 100644 --- a/packages/graphql/api/registration.ts +++ b/packages/graphql/api/registration.ts @@ -20,10 +20,6 @@ export class RegistrationService { } async getCustomer(variables: VariablesOf) { - if (variables.telegramId) { - await this.checkBanStatus(variables.telegramId); - } - const { query } = await getClientWithToken(); const result = await query({ @@ -66,21 +62,4 @@ export class RegistrationService { return mutationResult.data; } - - private async checkBanStatus(telegramId: number) { - const { query } = await getClientWithToken(); - - const result = await query({ - query: GQL.GetCustomerDocument, - variables: { telegramId }, - }); - - const customer = result.data.customers.at(0); - - if (customer && isCustomerBanned(customer)) { - throw new Error(ERRORS.NO_PERMISSION); - } - - return { customer }; - } }