-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add logger to registrationPin deleteService
- Loading branch information
1 parent
80d8bd5
commit 64830b3
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 9 additions & 2 deletions
11
apps/server/src/modules/registration-pin/service/registration-pin.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { LegacyLogger } from '@src/core/logger'; | ||
import { RegistrationPinRepo } from '../repo'; | ||
|
||
@Injectable() | ||
export class RegistrationPinService { | ||
constructor(private readonly registrationPinRepo: RegistrationPinRepo) {} | ||
constructor(private readonly registrationPinRepo: RegistrationPinRepo, private readonly logger: LegacyLogger) { | ||
this.logger.setContext(RegistrationPinService.name); | ||
} | ||
|
||
async deleteRegistrationPinByEmail(email: string): Promise<number> { | ||
return this.registrationPinRepo.deleteRegistrationPinByEmail(email); | ||
this.logger.log({ action: 'Deleting registrationPin for ', email }); | ||
const result = this.registrationPinRepo.deleteRegistrationPinByEmail(email); | ||
this.logger.log({ action: 'Deleted registrationPin for ', email }); | ||
|
||
return result; | ||
} | ||
} |