🎨 change internal type

This commit is contained in:
微凉
2021-12-16 15:44:18 +08:00
parent bd7d27efc7
commit 92a0453e00
5 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ func (driver Lanzou) Config() base.DriverConfig {
func (driver Lanzou) Items() []base.Item {
return []base.Item{
{
Name: "onedrive_type",
Name: "internal_type",
Label: "lanzou type",
Type: base.TypeSelect,
Required: true,
@ -53,7 +53,7 @@ func (driver Lanzou) Items() []base.Item {
}
func (driver Lanzou) Save(account *model.Account, old *model.Account) error {
if account.OnedriveType == "cookie" {
if account.InternalType == "cookie" {
if account.RootFolder == "" {
account.RootFolder = "-1"
}
@ -121,7 +121,7 @@ func (driver Lanzou) Link(path string, account *model.Account) (*base.Link, erro
}
log.Debugf("down file: %+v", file)
downId := file.Id
if account.OnedriveType == "cookie" {
if account.InternalType == "cookie" {
downId, err = driver.GetDownPageId(file.Id, account)
if err != nil {
return nil, err

View File

@ -53,7 +53,7 @@ type LanZouFilesResp struct {
}
func (driver *Lanzou) GetFiles(folderId string, account *model.Account) ([]LanZouFile, error) {
if account.OnedriveType == "cookie" {
if account.InternalType == "cookie" {
files := make([]LanZouFile, 0)
var resp LanZouFilesResp
// folders