Test: new modifications in filesystem pkg

This commit is contained in:
HFO4
2021-11-16 20:54:21 +08:00
parent fcd9eddc54
commit 532bff820a
13 changed files with 170 additions and 110 deletions

View File

@@ -2,6 +2,7 @@ package onedrive
import (
"errors"
"github.com/cloudreve/Cloudreve/v3/pkg/cluster"
model "github.com/cloudreve/Cloudreve/v3/models"
"github.com/cloudreve/Cloudreve/v3/pkg/request"
@@ -28,7 +29,8 @@ type Client struct {
ClientSecret string
Redirect string
Request request.Client
Request request.Client
ClusterController cluster.Controller
}
// Endpoints OneDrive客户端相关设置
@@ -51,11 +53,12 @@ func NewClient(policy *model.Policy) (*Client, error) {
Credential: &Credential{
RefreshToken: policy.AccessKey,
},
Policy: policy,
ClientID: policy.BucketName,
ClientSecret: policy.SecretKey,
Redirect: policy.OptionsSerialized.OdRedirect,
Request: request.NewClient(),
Policy: policy,
ClientID: policy.BucketName,
ClientSecret: policy.SecretKey,
Redirect: policy.OptionsSerialized.OdRedirect,
Request: request.NewClient(),
ClusterController: cluster.DefaultController,
}
if client.Endpoints.DriverResource == "" {