chore!: remove getRandom api endpoint (#27780)

* chore!: remove getRandom api endpoint

* chore: sync openapi

* fix: test

* chore: more cleanup
This commit is contained in:
Brandon Wees
2026-04-14 20:32:12 -05:00
committed by GitHub
parent 41d2d84b21
commit 6da2d3d587
13 changed files with 2 additions and 357 deletions
-11
View File
@@ -39,7 +39,6 @@ import { requireElevatedPermission } from 'src/utils/access';
import {
getAssetFiles,
getDimensions,
getMyPartnerIds,
isPanorama,
onAfterUnlink,
onBeforeLink,
@@ -60,16 +59,6 @@ export class AssetService extends BaseService {
return mapStats(stats);
}
async getRandom(auth: AuthDto, count: number): Promise<AssetResponseDto[]> {
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 }));
}
async getUserAssetsByDeviceId(auth: AuthDto, deviceId: string) {
return this.assetRepository.getAllByDeviceId(auth.user.id, deviceId);
}