mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 02:39:03 -04:00 
			
		
		
		
	fix(web): incorrect shared album count (#677)
This commit is contained in:
		
							parent
							
								
									011332e509
								
							
						
					
					
						commit
						9e4ed2214b
					
				| @ -50,9 +50,14 @@ export class AlbumRepository implements IAlbumRepository { | |||||||
|       where: { sharedUserId: userId }, |       where: { sharedUserId: userId }, | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     const sharingAlbums = ownedAlbums.map((album) => album.sharedUsers?.length || 0).reduce((a, b) => a + b, 0); |     let sharedAlbumCount = 0; | ||||||
|  |     ownedAlbums.map((album) => { | ||||||
|  |       if (album.sharedUsers?.length) { | ||||||
|  |         sharedAlbumCount += 1; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
| 
 | 
 | ||||||
|     return new AlbumCountResponseDto(ownedAlbums.length, sharedAlbums, sharingAlbums); |     return new AlbumCountResponseDto(ownedAlbums.length, sharedAlbums, sharedAlbumCount); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async create(ownerId: string, createAlbumDto: CreateAlbumDto): Promise<AlbumEntity> { |   async create(ownerId: string, createAlbumDto: CreateAlbumDto): Promise<AlbumEntity> { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user