mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
fixed(drive):Delete old Dropbox renewapi (#296)
* add dropbox api * fixed(api):Delete old dropbox renew api --------- Signed-off-by: Suyunmeng <69945917+Suyunmeng@users.noreply.github.com> Co-authored-by: pikachuim <pikachuim@qq.com>
This commit is contained in:
@ -5,10 +5,6 @@ import (
|
||||
"github.com/OpenListTeam/OpenList/internal/op"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultClientID = "76lrwrklhdn1icb"
|
||||
)
|
||||
|
||||
type Addition struct {
|
||||
driver.RootPath
|
||||
UseOnlineAPI bool `json:"use_online_api" default:"true"`
|
||||
|
@ -28,7 +28,7 @@ func (d *Dropbox) refreshToken() error {
|
||||
SetQueryParams(map[string]string{
|
||||
"refresh_ui": d.RefreshToken,
|
||||
"server_use": "true",
|
||||
"driver_txt": "baiduyun_go",
|
||||
"driver_txt": "dropboxs_go",
|
||||
}).
|
||||
Get(u)
|
||||
if err != nil {
|
||||
@ -46,9 +46,6 @@ func (d *Dropbox) refreshToken() error {
|
||||
return nil
|
||||
}
|
||||
url := d.base + "/oauth2/token"
|
||||
if utils.SliceContains([]string{"", DefaultClientID}, d.ClientID) {
|
||||
url = d.APIAddress
|
||||
}
|
||||
var tokenResp TokenResp
|
||||
resp, err := base.RestyClient.R().
|
||||
//ForceContentType("application/x-www-form-urlencoded").
|
||||
|
Reference in New Issue
Block a user