fix(server): correctly identify integers

This commit is contained in:
Jason Rasmussen
2025-09-10 22:27:55 -04:00
parent 2d2673c114
commit b0291b6ad6
27 changed files with 152 additions and 135 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ class SessionCreateDto {
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
num? duration;
int? duration;
@override
bool operator ==(Object other) => identical(this, other) || other is SessionCreateDto &&
@@ -92,7 +92,7 @@ class SessionCreateDto {
return SessionCreateDto(
deviceOS: mapValueOfType<String>(json, r'deviceOS'),
deviceType: mapValueOfType<String>(json, r'deviceType'),
duration: num.parse('${json[r'duration']}'),
duration: mapValueOfType<int>(json, r'duration'),
);
}
return null;