refactor: remove unused shared users list (#17526)

This commit is contained in:
Jason Rasmussen 2025-04-10 12:44:47 -04:00 committed by GitHub
parent 7df2c9c905
commit 4412680679
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,13 +143,11 @@ export class AlbumResponseDto {
}
export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDto): AlbumResponseDto => {
const sharedUsers: UserResponseDto[] = [];
const albumUsers: AlbumUserResponseDto[] = [];
if (entity.albumUsers) {
for (const albumUser of entity.albumUsers) {
const user = mapUser(albumUser.user);
sharedUsers.push(user);
albumUsers.push({
user,
role: albumUser.role,
@ -162,7 +160,7 @@ export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDt
const assets = entity.assets || [];
const hasSharedLink = entity.sharedLinks?.length > 0;
const hasSharedUser = sharedUsers.length > 0;
const hasSharedUser = albumUsers.length > 0;
let startDate = assets.at(0)?.localDateTime;
let endDate = assets.at(-1)?.localDateTime;