mirror of
https://gitlab.com/mobicoop/v3/service/auth.git
synced 2025-12-30 21:22:41 +00:00
fix logging
This commit is contained in:
@@ -15,6 +15,7 @@ import { DeleteAuthUseCase } from './domain/usecases/delete-auth.usecase';
|
|||||||
import { RabbitMQModule } from '@golevelup/nestjs-rabbitmq';
|
import { RabbitMQModule } from '@golevelup/nestjs-rabbitmq';
|
||||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||||
import { AuthMessagerController } from './adapters/primaries/auth-messager.controller';
|
import { AuthMessagerController } from './adapters/primaries/auth-messager.controller';
|
||||||
|
import { LoggingMessager } from './adapters/secondaries/logging.messager';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -44,6 +45,7 @@ import { AuthMessagerController } from './adapters/primaries/auth-messager.contr
|
|||||||
AuthProfile,
|
AuthProfile,
|
||||||
UsernameProfile,
|
UsernameProfile,
|
||||||
AuthRepository,
|
AuthRepository,
|
||||||
|
LoggingMessager,
|
||||||
ValidateAuthUseCase,
|
ValidateAuthUseCase,
|
||||||
CreateAuthUseCase,
|
CreateAuthUseCase,
|
||||||
AddUsernameUseCase,
|
AddUsernameUseCase,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class CreateAuthUseCase {
|
|||||||
return auth;
|
return auth;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this._loggingMessager.publish(
|
this._loggingMessager.publish(
|
||||||
'auth.create.critical',
|
'auth.create.crit',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
command,
|
command,
|
||||||
error,
|
error,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export class DeleteAuthUseCase {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this._loggingMessager.publish(
|
this._loggingMessager.publish(
|
||||||
'auth.delete.critical',
|
'auth.delete.crit',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
command,
|
command,
|
||||||
error,
|
error,
|
||||||
|
|||||||
Reference in New Issue
Block a user