mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-29 03:11:56 +08:00
feat: return create date while list files
This commit is contained in:
@@ -341,6 +341,7 @@ func (fs *FileSystem) listObjects(ctx context.Context, parent string, files []mo
|
|||||||
Size: 0,
|
Size: 0,
|
||||||
Type: "dir",
|
Type: "dir",
|
||||||
Date: subFolder.UpdatedAt,
|
Date: subFolder.UpdatedAt,
|
||||||
|
CreateDate: subFolder.CreatedAt,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,6 +364,7 @@ func (fs *FileSystem) listObjects(ctx context.Context, parent string, files []mo
|
|||||||
Type: "file",
|
Type: "file",
|
||||||
Date: file.UpdatedAt,
|
Date: file.UpdatedAt,
|
||||||
SourceEnabled: file.GetPolicy().IsOriginLinkEnable,
|
SourceEnabled: file.GetPolicy().IsOriginLinkEnable,
|
||||||
|
CreateDate: file.CreatedAt,
|
||||||
}
|
}
|
||||||
if shareKey != "" {
|
if shareKey != "" {
|
||||||
newFile.Key = shareKey
|
newFile.Key = shareKey
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ type Object struct {
|
|||||||
Size uint64 `json:"size"`
|
Size uint64 `json:"size"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Date time.Time `json:"date"`
|
Date time.Time `json:"date"`
|
||||||
|
CreateDate time.Time `json:"create_date"`
|
||||||
Key string `json:"key,omitempty"`
|
Key string `json:"key,omitempty"`
|
||||||
SourceEnabled bool `json:"source_enabled"`
|
SourceEnabled bool `json:"source_enabled"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user