diff --git a/packages/graphql/api/base.ts b/packages/graphql/api/base.ts index fced362..fd65008 100644 --- a/packages/graphql/api/base.ts +++ b/packages/graphql/api/base.ts @@ -53,11 +53,7 @@ export class BaseService { const customer = result.data.customers.at(0); - if (!customer) { - throw new Error(BASE_ERRORS.NOT_FOUND_CUSTOMER); - } - - if (isCustomerBanned(customer)) { + if (customer && isCustomerBanned(customer)) { throw new Error(ERRORS.NO_PERMISSION); }