🚧 Change the location of the files and folders of the 189cloud

pull/548/head
微凉 2022-01-01 19:48:59 +08:00
parent f433277227
commit bc364cee0d
1 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,6 @@ func (driver Cloud189) GetFiles(fileId string, account *model.Account) ([]Cloud1
if resp.FileListAO.Count == 0 { if resp.FileListAO.Count == 0 {
break break
} }
res = append(res, resp.FileListAO.FileList...)
for _, folder := range resp.FileListAO.FolderList { for _, folder := range resp.FileListAO.FolderList {
res = append(res, Cloud189File{ res = append(res, Cloud189File{
Id: folder.Id, Id: folder.Id,
@ -257,6 +256,7 @@ func (driver Cloud189) GetFiles(fileId string, account *model.Account) ([]Cloud1
Size: -1, Size: -1,
}) })
} }
res = append(res, resp.FileListAO.FileList...)
pageNum++ pageNum++
} }
return res, nil return res, nil
@ -300,8 +300,8 @@ func (driver Cloud189) Request(url string, method string, form map[string]string
} }
} }
//log.Debug(res, jsoniter.Get(res.Body(),"res_code").ToInt()) //log.Debug(res, jsoniter.Get(res.Body(),"res_code").ToInt())
if jsoniter.Get(res.Body(),"res_code").ToInt() != 0 { if jsoniter.Get(res.Body(), "res_code").ToInt() != 0 {
err = errors.New(jsoniter.Get(res.Body(),"res_message").ToString()) err = errors.New(jsoniter.Get(res.Body(), "res_message").ToString())
} }
return res.Body(), err return res.Body(), err
} }