mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor!: migrate class-validator to zod (#26597)
This commit is contained in:
+4
-3
@@ -18,8 +18,9 @@ class OnThisDayDto {
|
||||
|
||||
/// Year for on this day memory
|
||||
///
|
||||
/// Minimum value: 1
|
||||
num year;
|
||||
/// Minimum value: 1000
|
||||
/// Maximum value: 9999
|
||||
int year;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is OnThisDayDto &&
|
||||
@@ -48,7 +49,7 @@ class OnThisDayDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return OnThisDayDto(
|
||||
year: num.parse('${json[r'year']}'),
|
||||
year: mapValueOfType<int>(json, r'year')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user