mirror of
https://github.com/immich-app/immich.git
synced 2026-03-04 09:57:33 +03:00
fix(server): include partner assets in random endpoint (#12599)
This commit is contained in:
@@ -623,14 +623,9 @@ export class AssetRepository implements IAssetRepository {
|
||||
return result;
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.UUID, DummyValue.NUMBER] })
|
||||
getRandom(ownerId: string, count: number): Promise<AssetEntity[]> {
|
||||
const builder = this.getBuilder({
|
||||
userIds: [ownerId],
|
||||
exifInfo: true,
|
||||
});
|
||||
|
||||
return builder.orderBy('RANDOM()').limit(count).getMany();
|
||||
@GenerateSql({ params: [[DummyValue.UUID], DummyValue.NUMBER] })
|
||||
getRandom(userIds: string[], count: number): Promise<AssetEntity[]> {
|
||||
return this.getBuilder({ userIds, exifInfo: true }).orderBy('RANDOM()').limit(count).getMany();
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [{ size: TimeBucketSize.MONTH }] })
|
||||
|
||||
Reference in New Issue
Block a user