Skip to content

Commit

Permalink
fix(core): Make verifyCustomerAccount channel-independent (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
karel-advantitge authored Jun 23, 2021
1 parent 391ee4b commit 39b3937
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/service/services/customer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,15 @@ export class CustomerService {
if (isGraphQlErrorResult(result)) {
return result;
}
const customer = await this.findOneByUserId(ctx, result.id);
const customer = await this.findOneByUserId(ctx, result.id, false);
if (!customer) {
throw new InternalServerError('error.cannot-locate-customer-for-user');
}
if (ctx.channelId) {
await this.channelService.assignToChannels(ctx, Customer, customer.id, [
ctx.channelId,
]);
}
await this.historyService.createHistoryEntryForCustomer({
customerId: customer.id,
ctx,
Expand Down

0 comments on commit 39b3937

Please sign in to comment.