1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

fix: no floats (replace with doubles) (#10218)

* fix: no floats (replace with doubles)

* Update server/src/utils/misc.ts

Co-authored-by: Zack Pollard <zackpollard@ymail.com>

---------

Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
Jason Rasmussen
2024-06-12 12:36:24 -04:00
committed by GitHub
parent 10aa00af21
commit 3d82005797
7 changed files with 35 additions and 17 deletions

View File

@@ -53,7 +53,7 @@ class DuplicateDetectionConfig {
return DuplicateDetectionConfig(
enabled: mapValueOfType<bool>(json, r'enabled')!,
maxDistance: mapValueOfType<double>(json, r'maxDistance')!,
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
);
}
return null;

View File

@@ -74,9 +74,9 @@ class FacialRecognitionConfig {
return FacialRecognitionConfig(
enabled: mapValueOfType<bool>(json, r'enabled')!,
maxDistance: mapValueOfType<double>(json, r'maxDistance')!,
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
minFaces: mapValueOfType<int>(json, r'minFaces')!,
minScore: mapValueOfType<double>(json, r'minScore')!,
minScore: (mapValueOfType<num>(json, r'minScore')!).toDouble(),
modelName: mapValueOfType<String>(json, r'modelName')!,
);
}

View File

@@ -84,7 +84,7 @@ class ServerStorageResponseDto {
diskAvailableRaw: mapValueOfType<int>(json, r'diskAvailableRaw')!,
diskSize: mapValueOfType<String>(json, r'diskSize')!,
diskSizeRaw: mapValueOfType<int>(json, r'diskSizeRaw')!,
diskUsagePercentage: mapValueOfType<double>(json, r'diskUsagePercentage')!,
diskUsagePercentage: (mapValueOfType<num>(json, r'diskUsagePercentage')!).toDouble(),
diskUse: mapValueOfType<String>(json, r'diskUse')!,
diskUseRaw: mapValueOfType<int>(json, r'diskUseRaw')!,
);