refactor use cases
This commit is contained in:
@@ -4,13 +4,6 @@ import type { INotificationPreferenceRepository } from '@core/notifications/doma
|
||||
import type { NotificationGatewayRegistry } from '@core/notifications/application/ports/NotificationGateway';
|
||||
import { SendNotificationUseCase } from '@core/notifications/application/use-cases/SendNotificationUseCase';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort';
|
||||
|
||||
class NoOpOutputPort implements UseCaseOutputPort<any> {
|
||||
present(_result: any): void {
|
||||
// No-op for adapter
|
||||
}
|
||||
}
|
||||
|
||||
export class NotificationServiceAdapter implements NotificationService {
|
||||
private readonly useCase: SendNotificationUseCase;
|
||||
@@ -27,7 +20,6 @@ export class NotificationServiceAdapter implements NotificationService {
|
||||
notificationRepository,
|
||||
preferenceRepository,
|
||||
gatewayRegistry,
|
||||
new NoOpOutputPort(),
|
||||
logger,
|
||||
);
|
||||
}
|
||||
@@ -45,4 +37,4 @@ export class NotificationServiceAdapter implements NotificationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user