Skip to content

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper committed Jun 21, 2024
1 parent ea7de6a commit ff0baab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -16,8 +15,7 @@ export class AccountServiceDb {
constructor(
private readonly accountRepo: AccountRepo,
private readonly idmService: IdentityManagementService,
private readonly configService: ConfigService<AccountConfig, true>,
private readonly logger: LegacyLogger
private readonly configService: ConfigService<AccountConfig, true>
) {}

async findById(id: EntityId): Promise<Account> {
Expand Down Expand Up @@ -64,7 +62,6 @@ export class AccountServiceDb {
}

async updateLastLogin(accountId: EntityId, lastLogin: Date): Promise<Account> {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit ff0baab

Please sign in to comment.