view data fixes

This commit is contained in:
2026-01-23 15:30:23 +01:00
parent e22033be38
commit f8099f04bc
213 changed files with 3466 additions and 3003 deletions

View File

@@ -1,23 +1,19 @@
// Note: No generated DTO available for UpdateAvatar yet
interface UpdateAvatarDTO {
success: boolean;
error?: string;
}
/**
* Update Avatar View Model
*
* Represents the result of an avatar update operation
*/
import { ViewModel } from "../contracts/view-models/ViewModel";
import type { UpdateAvatarViewData } from "../view-data/UpdateAvatarViewData";
export class UpdateAvatarViewModel extends ViewModel {
success: boolean;
error?: string;
constructor(dto: UpdateAvatarDTO) {
this.success = dto.success;
if (dto.error !== undefined) this.error = dto.error;
constructor(data: UpdateAvatarViewData) {
super();
this.success = data.success;
this.error = data.error;
}
/** UI-specific: Whether update was successful */
@@ -29,4 +25,4 @@ export class UpdateAvatarViewModel extends ViewModel {
get hasError(): boolean {
return !!this.error;
}
}
}