mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): asset service - upload asset (#1438)
* refactor: asset upload * refactor: background service * chore: tests * Regenerate api --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
2
mobile/openapi/README.md
generated
2
mobile/openapi/README.md
generated
@@ -3,7 +3,7 @@ Immich API
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.42.0
|
||||
- API version: 1.43.0
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
1
mobile/openapi/doc/AssetFileUploadResponseDto.md
generated
1
mobile/openapi/doc/AssetFileUploadResponseDto.md
generated
@@ -9,6 +9,7 @@ import 'package:openapi/api.dart';
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | |
|
||||
**duplicate** | **bool** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -14,25 +14,31 @@ class AssetFileUploadResponseDto {
|
||||
/// Returns a new [AssetFileUploadResponseDto] instance.
|
||||
AssetFileUploadResponseDto({
|
||||
required this.id,
|
||||
required this.duplicate,
|
||||
});
|
||||
|
||||
String id;
|
||||
|
||||
bool duplicate;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AssetFileUploadResponseDto &&
|
||||
other.id == id;
|
||||
other.id == id &&
|
||||
other.duplicate == duplicate;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(id.hashCode);
|
||||
(id.hashCode) +
|
||||
(duplicate.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AssetFileUploadResponseDto[id=$id]';
|
||||
String toString() => 'AssetFileUploadResponseDto[id=$id, duplicate=$duplicate]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'id'] = this.id;
|
||||
json[r'duplicate'] = this.duplicate;
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -56,6 +62,7 @@ class AssetFileUploadResponseDto {
|
||||
|
||||
return AssetFileUploadResponseDto(
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
duplicate: mapValueOfType<bool>(json, r'duplicate')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -106,6 +113,7 @@ class AssetFileUploadResponseDto {
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'id',
|
||||
'duplicate',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool duplicate
|
||||
test('to test the property `duplicate`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user