Files
gridpilot.gg/apps/api/src/domain/auth/presenters/ResetPasswordPresenter.ts
2026-01-16 21:44:26 +01:00

23 lines
708 B
TypeScript

import { ResetPasswordResult } from '@core/identity/application/use-cases/ResetPasswordUseCase';
import { UseCaseOutputPort } from '@core/shared/application';
import { Injectable } from '@nestjs/common';
@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;
}
}