1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-19 18:26:46 +01:00
immich/mobile/lib/utils/openapi_patching.dart
Alex e457d8d62e
chore(mobile): patch download > includeEmbeddedVideos user preferences (#11910)
* chore(mobile): patch download > includeEmbeddedVideos user preferences

* correct patch
2024-08-25 05:09:37 +00:00

17 lines
450 B
Dart

import 'package:openapi/api.dart';
dynamic upgradeDto(dynamic value, String targetType) {
switch (targetType) {
case 'UserPreferencesResponseDto':
if (value is Map) {
if (value['rating'] == null) {
value['rating'] = RatingResponse().toJson();
}
if (value['download']['includeEmbeddedVideos'] == null) {
value['download']['includeEmbeddedVideos'] = false;
}
}
break;
}
}