mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
Display created time of files.
This commit is contained in:
@@ -31,6 +31,7 @@ type FileView struct {
|
||||
Resource *ResourceView `json:"resource,omitempty"`
|
||||
Hash string `json:"hash,omitempty"`
|
||||
StorageName string `json:"storage_name,omitempty"`
|
||||
CreatedAt int64 `json:"created_at,omitempty"`
|
||||
}
|
||||
|
||||
func (f *File) ToView() *FileView {
|
||||
@@ -43,6 +44,7 @@ func (f *File) ToView() *FileView {
|
||||
User: f.User.ToView(),
|
||||
Hash: f.Hash,
|
||||
StorageName: f.Storage.Name,
|
||||
CreatedAt: f.CreatedAt.Unix(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user