auth
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user