You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
fix(server): don't return archived assets by default (#7278)
* don't show archived results by default * fix e2e * generate sql * set default in dto --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
2
mobile/openapi/doc/AssetApi.md
generated
2
mobile/openapi/doc/AssetApi.md
generated
@@ -1153,7 +1153,7 @@ Name | Type | Description | Notes
|
||||
**updatedAfter** | **DateTime**| | [optional]
|
||||
**updatedBefore** | **DateTime**| | [optional]
|
||||
**webpPath** | **String**| | [optional]
|
||||
**withArchived** | **bool**| | [optional]
|
||||
**withArchived** | **bool**| | [optional] [default to false]
|
||||
**withDeleted** | **bool**| | [optional]
|
||||
**withExif** | **bool**| | [optional]
|
||||
**withPeople** | **bool**| | [optional]
|
||||
|
2
mobile/openapi/doc/MetadataSearchDto.md
generated
2
mobile/openapi/doc/MetadataSearchDto.md
generated
@@ -46,7 +46,7 @@ Name | Type | Description | Notes
|
||||
**updatedAfter** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedBefore** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**webpPath** | **String** | | [optional]
|
||||
**withArchived** | **bool** | | [optional]
|
||||
**withArchived** | **bool** | | [optional] [default to false]
|
||||
**withDeleted** | **bool** | | [optional]
|
||||
**withExif** | **bool** | | [optional]
|
||||
**withPeople** | **bool** | | [optional]
|
||||
|
2
mobile/openapi/doc/SmartSearchDto.md
generated
2
mobile/openapi/doc/SmartSearchDto.md
generated
@@ -37,7 +37,7 @@ Name | Type | Description | Notes
|
||||
**type** | [**AssetTypeEnum**](AssetTypeEnum.md) | | [optional]
|
||||
**updatedAfter** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**updatedBefore** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**withArchived** | **bool** | | [optional]
|
||||
**withArchived** | **bool** | | [optional] [default to false]
|
||||
**withDeleted** | **bool** | | [optional]
|
||||
**withExif** | **bool** | | [optional]
|
||||
|
||||
|
18
mobile/openapi/lib/model/metadata_search_dto.dart
generated
18
mobile/openapi/lib/model/metadata_search_dto.dart
generated
@@ -51,7 +51,7 @@ class MetadataSearchDto {
|
||||
this.updatedAfter,
|
||||
this.updatedBefore,
|
||||
this.webpPath,
|
||||
this.withArchived,
|
||||
this.withArchived = false,
|
||||
this.withDeleted,
|
||||
this.withExif,
|
||||
this.withPeople,
|
||||
@@ -356,13 +356,7 @@ class MetadataSearchDto {
|
||||
///
|
||||
String? webpPath;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? withArchived;
|
||||
bool withArchived;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
@@ -483,7 +477,7 @@ class MetadataSearchDto {
|
||||
(updatedAfter == null ? 0 : updatedAfter!.hashCode) +
|
||||
(updatedBefore == null ? 0 : updatedBefore!.hashCode) +
|
||||
(webpPath == null ? 0 : webpPath!.hashCode) +
|
||||
(withArchived == null ? 0 : withArchived!.hashCode) +
|
||||
(withArchived.hashCode) +
|
||||
(withDeleted == null ? 0 : withDeleted!.hashCode) +
|
||||
(withExif == null ? 0 : withExif!.hashCode) +
|
||||
(withPeople == null ? 0 : withPeople!.hashCode) +
|
||||
@@ -680,11 +674,7 @@ class MetadataSearchDto {
|
||||
} else {
|
||||
// json[r'webpPath'] = null;
|
||||
}
|
||||
if (this.withArchived != null) {
|
||||
json[r'withArchived'] = this.withArchived;
|
||||
} else {
|
||||
// json[r'withArchived'] = null;
|
||||
}
|
||||
if (this.withDeleted != null) {
|
||||
json[r'withDeleted'] = this.withDeleted;
|
||||
} else {
|
||||
@@ -756,7 +746,7 @@ class MetadataSearchDto {
|
||||
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
|
||||
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
|
||||
webpPath: mapValueOfType<String>(json, r'webpPath'),
|
||||
withArchived: mapValueOfType<bool>(json, r'withArchived'),
|
||||
withArchived: mapValueOfType<bool>(json, r'withArchived') ?? false,
|
||||
withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
|
||||
withExif: mapValueOfType<bool>(json, r'withExif'),
|
||||
withPeople: mapValueOfType<bool>(json, r'withPeople'),
|
||||
|
18
mobile/openapi/lib/model/smart_search_dto.dart
generated
18
mobile/openapi/lib/model/smart_search_dto.dart
generated
@@ -42,7 +42,7 @@ class SmartSearchDto {
|
||||
this.type,
|
||||
this.updatedAfter,
|
||||
this.updatedBefore,
|
||||
this.withArchived,
|
||||
this.withArchived = false,
|
||||
this.withDeleted,
|
||||
this.withExif,
|
||||
});
|
||||
@@ -273,13 +273,7 @@ class SmartSearchDto {
|
||||
///
|
||||
DateTime? updatedBefore;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? withArchived;
|
||||
bool withArchived;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
@@ -364,7 +358,7 @@ class SmartSearchDto {
|
||||
(type == null ? 0 : type!.hashCode) +
|
||||
(updatedAfter == null ? 0 : updatedAfter!.hashCode) +
|
||||
(updatedBefore == null ? 0 : updatedBefore!.hashCode) +
|
||||
(withArchived == null ? 0 : withArchived!.hashCode) +
|
||||
(withArchived.hashCode) +
|
||||
(withDeleted == null ? 0 : withDeleted!.hashCode) +
|
||||
(withExif == null ? 0 : withExif!.hashCode);
|
||||
|
||||
@@ -514,11 +508,7 @@ class SmartSearchDto {
|
||||
} else {
|
||||
// json[r'updatedBefore'] = null;
|
||||
}
|
||||
if (this.withArchived != null) {
|
||||
json[r'withArchived'] = this.withArchived;
|
||||
} else {
|
||||
// json[r'withArchived'] = null;
|
||||
}
|
||||
if (this.withDeleted != null) {
|
||||
json[r'withDeleted'] = this.withDeleted;
|
||||
} else {
|
||||
@@ -569,7 +559,7 @@ class SmartSearchDto {
|
||||
type: AssetTypeEnum.fromJson(json[r'type']),
|
||||
updatedAfter: mapDateTime(json, r'updatedAfter', r''),
|
||||
updatedBefore: mapDateTime(json, r'updatedBefore', r''),
|
||||
withArchived: mapValueOfType<bool>(json, r'withArchived'),
|
||||
withArchived: mapValueOfType<bool>(json, r'withArchived') ?? false,
|
||||
withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
|
||||
withExif: mapValueOfType<bool>(json, r'withExif'),
|
||||
);
|
||||
|
@@ -206,7 +206,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool withArchived
|
||||
// bool withArchived (default value: false)
|
||||
test('to test the property `withArchived`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
2
mobile/openapi/test/smart_search_dto_test.dart
generated
2
mobile/openapi/test/smart_search_dto_test.dart
generated
@@ -161,7 +161,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool withArchived
|
||||
// bool withArchived (default value: false)
|
||||
test('to test the property `withArchived`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
Reference in New Issue
Block a user