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
@@ -16,7 +16,6 @@ import {
AssetStatsDto,
AssetStatsResponseDto,
DeviceIdDto,
RandomAssetsDto,
UpdateAssetDto,
} from 'src/dtos/asset.dto';
import { AuthDto } from 'src/dtos/auth.dto';
@@ -32,17 +31,6 @@ import { UUIDParamDto } from 'src/validation';
export class AssetController {
constructor(private service: AssetService) {}
@Get('random')
@Authenticated({ permission: Permission.AssetRead })
@Endpoint({
summary: 'Get random assets',
description: 'Retrieve a specified number of random assets for the authenticated user.',
history: new HistoryBuilder().added('v1').deprecated('v1', { replacementId: 'searchAssets' }),
})
getRandom(@Auth() auth: AuthDto, @Query() dto: RandomAssetsDto): Promise<AssetResponseDto[]> {
return this.service.getRandom(auth, dto.count ?? 1);
}
@Get('/device/:deviceId')
@Endpoint({
summary: 'Retrieve assets by device ID',