view data fixes
This commit is contained in:
@@ -16,12 +16,11 @@ export class OnboardingViewModelBuilder implements ViewModelBuilder<any, any> {
|
||||
return OnboardingViewModelBuilder.build(input);
|
||||
}
|
||||
|
||||
static build(
|
||||
static build(apiDto: { isAlreadyOnboarded: boolean }): Result<OnboardingViewModel, DomainError> {
|
||||
try {
|
||||
return Result.ok({
|
||||
return Result.ok(new OnboardingViewModel({
|
||||
isAlreadyOnboarded: apiDto.isAlreadyOnboarded || false,
|
||||
});
|
||||
}));
|
||||
} catch (error) {
|
||||
const errorMessage = error instanceof Error ? error.message : 'Failed to build ViewModel';
|
||||
return Result.err({ type: 'unknown', message: errorMessage });
|
||||
|
||||
Reference in New Issue
Block a user