mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	refactor(server): album count (#2746)
* refactor(server): album count * chore: open api
This commit is contained in:
		
							
								
								
									
										10
									
								
								mobile/openapi/lib/api/album_api.dart
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										10
									
								
								mobile/openapi/lib/api/album_api.dart
									
									
									
										generated
									
									
									
								
							@@ -332,10 +332,10 @@ class AlbumApi {
 | 
			
		||||
    return null;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Performs an HTTP 'GET /album/count-by-user-id' operation and returns the [Response].
 | 
			
		||||
  Future<Response> getAlbumCountByUserIdWithHttpInfo() async {
 | 
			
		||||
  /// Performs an HTTP 'GET /album/count' operation and returns the [Response].
 | 
			
		||||
  Future<Response> getAlbumCountWithHttpInfo() async {
 | 
			
		||||
    // ignore: prefer_const_declarations
 | 
			
		||||
    final path = r'/album/count-by-user-id';
 | 
			
		||||
    final path = r'/album/count';
 | 
			
		||||
 | 
			
		||||
    // ignore: prefer_final_locals
 | 
			
		||||
    Object? postBody;
 | 
			
		||||
@@ -358,8 +358,8 @@ class AlbumApi {
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  Future<AlbumCountResponseDto?> getAlbumCountByUserId() async {
 | 
			
		||||
    final response = await getAlbumCountByUserIdWithHttpInfo();
 | 
			
		||||
  Future<AlbumCountResponseDto?> getAlbumCount() async {
 | 
			
		||||
    final response = await getAlbumCountWithHttpInfo();
 | 
			
		||||
    if (response.statusCode >= HttpStatus.badRequest) {
 | 
			
		||||
      throw ApiException(response.statusCode, await _decodeBodyBytes(response));
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -15,36 +15,36 @@ class AlbumCountResponseDto {
 | 
			
		||||
  AlbumCountResponseDto({
 | 
			
		||||
    required this.owned,
 | 
			
		||||
    required this.shared,
 | 
			
		||||
    required this.sharing,
 | 
			
		||||
    required this.notShared,
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  int owned;
 | 
			
		||||
 | 
			
		||||
  int shared;
 | 
			
		||||
 | 
			
		||||
  int sharing;
 | 
			
		||||
  int notShared;
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  bool operator ==(Object other) => identical(this, other) || other is AlbumCountResponseDto &&
 | 
			
		||||
     other.owned == owned &&
 | 
			
		||||
     other.shared == shared &&
 | 
			
		||||
     other.sharing == sharing;
 | 
			
		||||
     other.notShared == notShared;
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  int get hashCode =>
 | 
			
		||||
    // ignore: unnecessary_parenthesis
 | 
			
		||||
    (owned.hashCode) +
 | 
			
		||||
    (shared.hashCode) +
 | 
			
		||||
    (sharing.hashCode);
 | 
			
		||||
    (notShared.hashCode);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  String toString() => 'AlbumCountResponseDto[owned=$owned, shared=$shared, sharing=$sharing]';
 | 
			
		||||
  String toString() => 'AlbumCountResponseDto[owned=$owned, shared=$shared, notShared=$notShared]';
 | 
			
		||||
 | 
			
		||||
  Map<String, dynamic> toJson() {
 | 
			
		||||
    final json = <String, dynamic>{};
 | 
			
		||||
      json[r'owned'] = this.owned;
 | 
			
		||||
      json[r'shared'] = this.shared;
 | 
			
		||||
      json[r'sharing'] = this.sharing;
 | 
			
		||||
      json[r'notShared'] = this.notShared;
 | 
			
		||||
    return json;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -69,7 +69,7 @@ class AlbumCountResponseDto {
 | 
			
		||||
      return AlbumCountResponseDto(
 | 
			
		||||
        owned: mapValueOfType<int>(json, r'owned')!,
 | 
			
		||||
        shared: mapValueOfType<int>(json, r'shared')!,
 | 
			
		||||
        sharing: mapValueOfType<int>(json, r'sharing')!,
 | 
			
		||||
        notShared: mapValueOfType<int>(json, r'notShared')!,
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
    return null;
 | 
			
		||||
@@ -119,7 +119,7 @@ class AlbumCountResponseDto {
 | 
			
		||||
  static const requiredKeys = <String>{
 | 
			
		||||
    'owned',
 | 
			
		||||
    'shared',
 | 
			
		||||
    'sharing',
 | 
			
		||||
    'notShared',
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user