-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: expose createdAt in getAssetInfo #21184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need some kind of test case to verify that this is present, or is the ts compiler validating it enough?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like this it's fine |
||
| deviceAssetId: entity.deviceAssetId, | ||
| ownerId: entity.ownerId, | ||
| owner: entity.owner ? mapUser(entity.owner) : undefined, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this automatically go to the API docs in CI, or do I need to run something to rebuild the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generating the open-api specs (what you did) is all it takes :)