working commit
This commit is contained in:
+4
-5
@@ -13,7 +13,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"mstore/app/handler"
|
||||
"mstore/app/operator"
|
||||
@@ -22,7 +21,7 @@ import (
|
||||
func (cli *Client) CreateGrant(ctx context.Context, hosturi, accountID, operation, pattern string) error {
|
||||
var err error
|
||||
|
||||
apiuri, err := url.JoinPath(hosturi, "/v3/api/grant/create")
|
||||
apiuri, err := setApiPath(hosturi, "/v3/api/grant/create")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -55,7 +54,7 @@ func (cli *Client) CreateGrant(ctx context.Context, hosturi, accountID, operatio
|
||||
func (cli *Client) GetGrant(ctx context.Context, hosturi, id, username string) error {
|
||||
var err error
|
||||
|
||||
apipath, err := url.JoinPath(hosturi, "/v3/api/grant/get")
|
||||
apipath, err := setApiPath(hosturi, "/v3/api/grant/get")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -86,7 +85,7 @@ func (cli *Client) GetGrant(ctx context.Context, hosturi, id, username string) e
|
||||
func (cli *Client) UpdateGrant(ctx context.Context, hosturi, grantID, newPattern string) error {
|
||||
var err error
|
||||
|
||||
apipath, err := url.JoinPath(hosturi, "/v3/api/grant/update")
|
||||
apipath, err := setApiPath(hosturi, "/v3/api/grant/update")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -117,7 +116,7 @@ func (cli *Client) UpdateGrant(ctx context.Context, hosturi, grantID, newPattern
|
||||
func (cli *Client) DeleteGrant(ctx context.Context, hosturi, grantID string) error {
|
||||
var err error
|
||||
|
||||
apipath, err := url.JoinPath(hosturi, "/v3/api/grant/delete")
|
||||
apipath, err := setApiPath(hosturi, "/v3/api/grant/delete")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user