fix(server): correctly identify integers
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ class OnThisDayDto {
|
||||
});
|
||||
|
||||
/// Minimum value: 1
|
||||
num year;
|
||||
int year;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is OnThisDayDto &&
|
||||
@@ -46,7 +46,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