From ff0baab24683cfd3fd0d6d62a7ad196a90a7e67e Mon Sep 17 00:00:00 2001 From: dyedwiper Date: Fri, 21 Jun 2024 16:05:52 +0200 Subject: [PATCH] Remove logs --- .../modules/account/domain/services/account-db.service.ts | 5 +---- .../src/modules/account/repo/micro-orm/account.repo.ts | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/server/src/modules/account/domain/services/account-db.service.ts b/apps/server/src/modules/account/domain/services/account-db.service.ts index 8d9185cc337..b528cfec08a 100644 --- a/apps/server/src/modules/account/domain/services/account-db.service.ts +++ b/apps/server/src/modules/account/domain/services/account-db.service.ts @@ -4,7 +4,6 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config/dist/config.service'; import { EntityNotFoundError } from '@shared/common'; import { Counted, EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; import bcrypt from 'bcryptjs'; import { AccountConfig } from '../../account-config'; import { AccountRepo } from '../../repo/micro-orm/account.repo'; @@ -16,8 +15,7 @@ export class AccountServiceDb { constructor( private readonly accountRepo: AccountRepo, private readonly idmService: IdentityManagementService, - private readonly configService: ConfigService, - private readonly logger: LegacyLogger + private readonly configService: ConfigService ) {} async findById(id: EntityId): Promise { @@ -64,7 +62,6 @@ export class AccountServiceDb { } async updateLastLogin(accountId: EntityId, lastLogin: Date): Promise { - this.logger.debug(`Updating last login for ${accountId} to ${lastLogin.toISOString()}`); const internalId = await this.getInternalId(accountId); const account = await this.accountRepo.findById(internalId); account.lastLogin = lastLogin; diff --git a/apps/server/src/modules/account/repo/micro-orm/account.repo.ts b/apps/server/src/modules/account/repo/micro-orm/account.repo.ts index 298a671202f..8c158c552ea 100644 --- a/apps/server/src/modules/account/repo/micro-orm/account.repo.ts +++ b/apps/server/src/modules/account/repo/micro-orm/account.repo.ts @@ -3,7 +3,6 @@ import { EntityManager, ObjectId } from '@mikro-orm/mongodb'; import { Injectable } from '@nestjs/common'; import { SortOrder } from '@shared/domain/interface'; import { Counted, EntityId } from '@shared/domain/types'; -import { LegacyLogger } from '@src/core/logger'; import { Account } from '../../domain/account'; import { AccountEntity } from '../../domain/entity/account.entity'; import { AccountEntityToDoMapper } from './mapper'; @@ -12,7 +11,7 @@ import { AccountScope } from './scope/account-scope'; @Injectable() export class AccountRepo { - constructor(private readonly em: EntityManager, private readonly logger: LegacyLogger) {} + constructor(private readonly em: EntityManager) {} get entityName() { return AccountEntity; @@ -22,9 +21,6 @@ export class AccountRepo { const saveEntity = AccountDoToEntityMapper.mapToEntity(account); const existing = await this.em.findOne(AccountEntity, { id: account.id }); - this.logger.debug('existing', JSON.stringify(existing)); - this.logger.debug('Saving account', JSON.stringify(saveEntity)); - let saved: AccountEntity; if (existing) { saved = this.em.assign(existing, saveEntity);