🐛 close #581 teambition update time error

pull/661/head
Xhofe 2022-02-21 17:20:05 +08:00
parent 724fc7f37e
commit 52ee2e0a8b
4 changed files with 17 additions and 17 deletions

View File

@ -98,7 +98,7 @@ func (driver Teambition) GetFiles(parentId string, account *model.Account) ([]mo
Size: 0, Size: 0,
Type: conf.FOLDER, Type: conf.FOLDER,
Driver: driver.Config().Name, Driver: driver.Config().Name,
UpdatedAt: &collection.Updated, UpdatedAt: collection.Updated,
}) })
} }
} }
@ -126,7 +126,7 @@ func (driver Teambition) GetFiles(parentId string, account *model.Account) ([]mo
Size: work.FileSize, Size: work.FileSize,
Type: utils.GetFileType(path.Ext(work.FileName)), Type: utils.GetFileType(path.Ext(work.FileName)),
Driver: driver.Config().Name, Driver: driver.Config().Name,
UpdatedAt: &work.Updated, UpdatedAt: work.Updated,
Thumbnail: work.Thumbnail, Thumbnail: work.Thumbnail,
Url: work.DownloadURL, Url: work.DownloadURL,
}) })

View File

@ -3,22 +3,22 @@ package teambition
import "time" import "time"
type Collection struct { type Collection struct {
ID string `json:"_id"` ID string `json:"_id"`
Title string `json:"title"` Title string `json:"title"`
Updated time.Time `json:"updated"` Updated *time.Time `json:"updated"`
} }
type Work struct { type Work struct {
ID string `json:"_id"` ID string `json:"_id"`
FileName string `json:"fileName"` FileName string `json:"fileName"`
FileSize int64 `json:"fileSize"` FileSize int64 `json:"fileSize"`
FileKey string `json:"fileKey"` FileKey string `json:"fileKey"`
FileCategory string `json:"fileCategory"` FileCategory string `json:"fileCategory"`
DownloadURL string `json:"downloadUrl"` DownloadURL string `json:"downloadUrl"`
ThumbnailURL string `json:"thumbnailUrl"` ThumbnailURL string `json:"thumbnailUrl"`
Thumbnail string `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Updated time.Time `json:"updated"` Updated *time.Time `json:"updated"`
PreviewURL string `json:"previewUrl"` PreviewURL string `json:"previewUrl"`
} }
type FileUpload struct { type FileUpload struct {

View File

@ -26,7 +26,7 @@ type File struct {
//} `json:"exif"` //} `json:"exif"`
//Created time.Time `json:"created"` //Created time.Time `json:"created"`
//ResourceId string `json:"resource_id"` //ResourceId string `json:"resource_id"`
Modified time.Time `json:"modified"` Modified *time.Time `json:"modified"`
//MimeType string `json:"mime_type"` //MimeType string `json:"mime_type"`
File string `json:"file"` File string `json:"file"`
//MediaType string `json:"media_type"` //MediaType string `json:"media_type"`

View File

@ -131,7 +131,7 @@ func (driver Yandex) GetFiles(rawPath string, account *model.Account) ([]model.F
Name: file.Name, Name: file.Name,
Size: file.Size, Size: file.Size,
Driver: driver.Config().Name, Driver: driver.Config().Name,
UpdatedAt: &file.Modified, UpdatedAt: file.Modified,
Thumbnail: file.Preview, Thumbnail: file.Preview,
Url: file.File, Url: file.File,
} }