style: shorten name operations
to op
This commit is contained in:
@ -48,7 +48,7 @@ func (d *AliDrive) Init(ctx context.Context, storage model.Storage) error {
|
||||
return err
|
||||
}
|
||||
// TODO login / refresh token
|
||||
//operations.MustSaveDriverStorage(d)
|
||||
//op.MustSaveDriverStorage(d)
|
||||
err = d.refreshToken()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -2,7 +2,7 @@ package local
|
||||
|
||||
import (
|
||||
"github.com/alist-org/alist/v3/internal/driver"
|
||||
"github.com/alist-org/alist/v3/internal/operations"
|
||||
"github.com/alist-org/alist/v3/internal/op"
|
||||
)
|
||||
|
||||
type Addition struct {
|
||||
@ -23,5 +23,5 @@ func New() driver.Driver {
|
||||
}
|
||||
|
||||
func init() {
|
||||
operations.RegisterDriver(config, New)
|
||||
op.RegisterDriver(config, New)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/alist-org/alist/v3/drivers/base"
|
||||
"github.com/alist-org/alist/v3/internal/operations"
|
||||
"github.com/alist-org/alist/v3/internal/op"
|
||||
"github.com/alist-org/alist/v3/pkg/utils"
|
||||
"github.com/go-resty/resty/v2"
|
||||
)
|
||||
@ -30,7 +30,7 @@ func (d *AliDrive) refreshToken() error {
|
||||
return fmt.Errorf("failed to refresh token: %s", e.Message)
|
||||
}
|
||||
d.RefreshToken, d.AccessToken = resp.RefreshToken, resp.AccessToken
|
||||
operations.MustSaveDriverStorage(d)
|
||||
op.MustSaveDriverStorage(d)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user