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

@@ -6,6 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/cloudreve/Cloudreve/v3/pkg/conf"
"io"
"io/ioutil"
"net/http"
@@ -573,7 +574,7 @@ func sysError(err error) *RespError {
func (client *Client) request(ctx context.Context, method string, url string, body io.Reader, option ...request.Option) (string, *RespError) {
// 获取凭证
err := client.UpdateCredential(ctx)
err := client.UpdateCredential(ctx, conf.SystemConfig.Mode == "slave")
if err != nil {
return "", sysError(err)
}