23 lines
708 B
TypeScript
23 lines
708 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { UseCaseOutputPort } from '@core/shared/application';
|
|
import { ResetPasswordResult } from '@core/identity/application/use-cases/ResetPasswordUseCase';
|
|
|
|
@Injectable()
|
|
export class ResetPasswordPresenter implements UseCaseOutputPort<ResetPasswordResult> {
|
|
private _responseModel: ResetPasswordResult | null = null;
|
|
|
|
present(result: ResetPasswordResult): void {
|
|
this._responseModel = result;
|
|
}
|
|
|
|
get responseModel(): ResetPasswordResult {
|
|
if (!this._responseModel) {
|
|
throw new Error('ResetPasswordPresenter: No response model available');
|
|
}
|
|
return this._responseModel;
|
|
}
|
|
|
|
reset(): void {
|
|
this._responseModel = null;
|
|
}
|
|
} |