feat: expose createdAt in getAssetInfo (#21184)

* Expose createdAt in getAssetInfo

* Add missing createdAt fields
This commit is contained in:
Wingy 2025-08-25 11:27:21 -04:00 committed by GitHub
parent c2313f7a99
commit 5fb8d651ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 1 deletions

View file

@ -37,6 +37,13 @@ export class SanitizedAssetResponseDto {
}
export class AssetResponseDto extends SanitizedAssetResponseDto {
@ApiProperty({
type: 'string',
format: 'date-time',
description: 'The UTC timestamp when the asset was originally uploaded to Immich.',
example: '2024-01-15T20:30:00.000Z',
})
createdAt!: Date;
deviceAssetId!: string;
deviceId!: string;
ownerId!: string;
@ -190,6 +197,7 @@ export function mapAsset(entity: MapAsset, options: AssetMapOptions = {}): Asset
return {
id: entity.id,
createdAt: entity.createdAt,
deviceAssetId: entity.deviceAssetId,
ownerId: entity.ownerId,
owner: entity.owner ? mapUser(entity.owner) : undefined,