This commit is contained in:
parent
d53eecc229
commit
b9f397d29f
@ -2,11 +2,13 @@ package _139
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/alist-org/alist/v3/drivers/base"
|
"github.com/alist-org/alist/v3/drivers/base"
|
||||||
@ -69,29 +71,28 @@ func (d *Yun139) Init(ctx context.Context) error {
|
|||||||
default:
|
default:
|
||||||
return errs.NotImplement
|
return errs.NotImplement
|
||||||
}
|
}
|
||||||
// if d.ref != nil {
|
if d.ref != nil {
|
||||||
// return nil
|
return nil
|
||||||
// }
|
}
|
||||||
// decode, err := base64.StdEncoding.DecodeString(d.Authorization)
|
decode, err := base64.StdEncoding.DecodeString(d.Authorization)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// return err
|
return err
|
||||||
// }
|
}
|
||||||
// decodeStr := string(decode)
|
decodeStr := string(decode)
|
||||||
// splits := strings.Split(decodeStr, ":")
|
splits := strings.Split(decodeStr, ":")
|
||||||
// if len(splits) < 2 {
|
if len(splits) < 2 {
|
||||||
// return fmt.Errorf("authorization is invalid, splits < 2")
|
return fmt.Errorf("authorization is invalid, splits < 2")
|
||||||
// }
|
}
|
||||||
// d.Account = splits[1]
|
d.Account = splits[1]
|
||||||
// _, err = d.post("/orchestration/personalCloud/user/v1.0/qryUserExternInfo", base.Json{
|
_, err = d.post("/orchestration/personalCloud/user/v1.0/qryUserExternInfo", base.Json{
|
||||||
// "qryUserExternInfoReq": base.Json{
|
"qryUserExternInfoReq": base.Json{
|
||||||
// "commonAccountInfo": base.Json{
|
"commonAccountInfo": base.Json{
|
||||||
// "account": d.getAccount(),
|
"account": d.getAccount(),
|
||||||
// "accountType": 1,
|
"accountType": 1,
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// }, nil)
|
}, nil)
|
||||||
// return err
|
return err
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Yun139) InitReference(storage driver.Driver) error {
|
func (d *Yun139) InitReference(storage driver.Driver) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user