mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 01:11:16 +03:00
fix(server): include partner assets in random endpoint (#12599)
This commit is contained in:
@@ -98,7 +98,12 @@ export class AssetService {
|
||||
}
|
||||
|
||||
async getRandom(auth: AuthDto, count: number): Promise<AssetResponseDto[]> {
|
||||
const assets = await this.assetRepository.getRandom(auth.user.id, count);
|
||||
const partnerIds = await getMyPartnerIds({
|
||||
userId: auth.user.id,
|
||||
repository: this.partnerRepository,
|
||||
timelineEnabled: true,
|
||||
});
|
||||
const assets = await this.assetRepository.getRandom([auth.user.id, ...partnerIds], count);
|
||||
return assets.map((a) => mapAsset(a, { auth }));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user