File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,14 @@ paths:
466
466
- $ref : " #/components/schemas/DB-Object"
467
467
- type : object
468
468
properties :
469
+ lastModifiedDate :
470
+ type : string
471
+ format : date-time
472
+ description : >-
473
+ The object creation date or the last modified date (as exposed
474
+ by S3's `Last-Modified` header), whichever is the latest.
475
+ example : " 2022-03-11T23:19:16.343Z"
476
+ default : null
469
477
permissions :
470
478
type : array
471
479
description : >-
Original file line number Diff line number Diff line change @@ -174,6 +174,13 @@ const service = {
174
174
. map ( o => o . permCode ) ;
175
175
}
176
176
}
177
+ if ( Array . isArray ( version ) && version . length > 0 ) {
178
+ const latestVersion = version . find ( v => v . isLatest ) ;
179
+
180
+ object . lastModifiedDate =
181
+ latestVersion . lastModifiedDate ?? latestVersion . createdAt ?? latestVersion . updatedAt ;
182
+ }
183
+
177
184
return object ;
178
185
} ) . filter ( x => x ) // Drop empty row results from the array set
179
186
) ;
You can’t perform that action at this time.
0 commit comments