Skip to content

Commit

Permalink
throw err
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jul 21, 2023
1 parent 02dbc28 commit 7c7aada
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions drivers/123/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"crypto/md5"
"errors"
"fmt"
"github.com/alist-org/alist/v3/drivers/base"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/go-resty/resty/v2"
jsoniter "github.com/json-iterator/go"
"math/rand"
"net/http"
"net/url"
"strconv"
"time"

"github.com/alist-org/alist/v3/drivers/base"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/go-resty/resty/v2"
jsoniter "github.com/json-iterator/go"
)

// do others that not defined in Driver interface
Expand Down Expand Up @@ -98,14 +99,16 @@ func (d *Pan123) request(url string, method string, callback base.ReqCallback, r
"app-version": "3",
"user-agent": base.UserAgent,
})
authKey, err := authKey(url)

if callback != nil {
callback(req)
}
if resp != nil {
req.SetResult(resp)
}
authKey, err := authKey(url)
if err != nil {
return nil, err
}
req.SetQueryParam("auth-key", *authKey)
res, err := req.Execute(method, url)
if err != nil {
Expand Down

0 comments on commit 7c7aada

Please sign in to comment.