mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: expose createdAt in getAssetInfo (#21184)
* Expose createdAt in getAssetInfo * Add missing createdAt fields
This commit is contained in:
parent
c2313f7a99
commit
5fb8d651ec
6 changed files with 29 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue