feat: return create date while list files
This commit is contained in:
parent
6c93e37777
commit
8741c3cc78
2 changed files with 10 additions and 7 deletions
|
@ -334,13 +334,14 @@ func (fs *FileSystem) listObjects(ctx context.Context, parent string, files []mo
|
|||
}
|
||||
|
||||
objects = append(objects, serializer.Object{
|
||||
ID: hashid.HashID(subFolder.ID, hashid.FolderID),
|
||||
Name: subFolder.Name,
|
||||
Path: processedPath,
|
||||
Pic: "",
|
||||
Size: 0,
|
||||
Type: "dir",
|
||||
Date: subFolder.UpdatedAt,
|
||||
ID: hashid.HashID(subFolder.ID, hashid.FolderID),
|
||||
Name: subFolder.Name,
|
||||
Path: processedPath,
|
||||
Pic: "",
|
||||
Size: 0,
|
||||
Type: "dir",
|
||||
Date: subFolder.UpdatedAt,
|
||||
CreateDate: subFolder.CreatedAt,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -363,6 +364,7 @@ func (fs *FileSystem) listObjects(ctx context.Context, parent string, files []mo
|
|||
Type: "file",
|
||||
Date: file.UpdatedAt,
|
||||
SourceEnabled: file.GetPolicy().IsOriginLinkEnable,
|
||||
CreateDate: file.CreatedAt,
|
||||
}
|
||||
if shareKey != "" {
|
||||
newFile.Key = shareKey
|
||||
|
|
|
@ -40,6 +40,7 @@ type Object struct {
|
|||
Size uint64 `json:"size"`
|
||||
Type string `json:"type"`
|
||||
Date time.Time `json:"date"`
|
||||
CreateDate time.Time `json:"create_date"`
|
||||
Key string `json:"key,omitempty"`
|
||||
SourceEnabled bool `json:"source_enabled"`
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue