Files
gridpilot.gg/apps/api/src/domain/auth/presenters/ResetPasswordPresenter.ts
2025-12-31 19:55:43 +01:00

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;
}
}