File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,14 @@ paths:
466466 - $ref : " #/components/schemas/DB-Object"
467467 - type : object
468468 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
469477 permissions :
470478 type : array
471479 description : >-
Original file line number Diff line number Diff line change @@ -174,6 +174,13 @@ const service = {
174174 . map ( o => o . permCode ) ;
175175 }
176176 }
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+
177184 return object ;
178185 } ) . filter ( x => x ) // Drop empty row results from the array set
179186 ) ;
You can’t perform that action at this time.
0 commit comments