mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 04:05:39 -04:00
refactor: remove unused shared users list (#17526)
This commit is contained in:
parent
7df2c9c905
commit
4412680679
@ -143,13 +143,11 @@ export class AlbumResponseDto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDto): AlbumResponseDto => {
|
export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDto): AlbumResponseDto => {
|
||||||
const sharedUsers: UserResponseDto[] = [];
|
|
||||||
const albumUsers: AlbumUserResponseDto[] = [];
|
const albumUsers: AlbumUserResponseDto[] = [];
|
||||||
|
|
||||||
if (entity.albumUsers) {
|
if (entity.albumUsers) {
|
||||||
for (const albumUser of entity.albumUsers) {
|
for (const albumUser of entity.albumUsers) {
|
||||||
const user = mapUser(albumUser.user);
|
const user = mapUser(albumUser.user);
|
||||||
sharedUsers.push(user);
|
|
||||||
albumUsers.push({
|
albumUsers.push({
|
||||||
user,
|
user,
|
||||||
role: albumUser.role,
|
role: albumUser.role,
|
||||||
@ -162,7 +160,7 @@ export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDt
|
|||||||
const assets = entity.assets || [];
|
const assets = entity.assets || [];
|
||||||
|
|
||||||
const hasSharedLink = entity.sharedLinks?.length > 0;
|
const hasSharedLink = entity.sharedLinks?.length > 0;
|
||||||
const hasSharedUser = sharedUsers.length > 0;
|
const hasSharedUser = albumUsers.length > 0;
|
||||||
|
|
||||||
let startDate = assets.at(0)?.localDateTime;
|
let startDate = assets.at(0)?.localDateTime;
|
||||||
let endDate = assets.at(-1)?.localDateTime;
|
let endDate = assets.at(-1)?.localDateTime;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user