diff --git a/src/modules/business/business.service.ts b/src/modules/business/business.service.ts index 932d481..2c3eeeb 100644 --- a/src/modules/business/business.service.ts +++ b/src/modules/business/business.service.ts @@ -1,4 +1,4 @@ -import { Injectable, NotFoundException } from '@nestjs/common'; +import { Injectable, Logger, NotFoundException } from '@nestjs/common'; import { SetupBusinessDto } from './dto/setup-business.dto'; import { UpdateBusinessDto } from './dto/update-business.dto'; import { EntityManager } from '@mikro-orm/postgresql'; @@ -10,6 +10,8 @@ import { Catalogue } from '../catalogue/entities/catalogue.entity'; @Injectable() export class BusinessService { + private readonly logger = new Logger(BusinessService.name); + constructor( private readonly em: EntityManager, private readonly businessRepository: BusinessRepository @@ -17,7 +19,10 @@ export class BusinessService { async setupAccount(dto: SetupBusinessDto) { const { danakSubscriptionId, name, phone, slug, firstName, lastName, maxCataloguesCount } = dto - + this.logger.log('recived request from danak payload', { + danakSubscriptionId, name, phone, slug, + firstName, lastName, maxCataloguesCount + }) const business = await this.em.transactional(async (em) => { const business = em.create(Business, { danakSubscriptionId,