Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
onerain88 committed Aug 3, 2020
1 parent e3886b4 commit b459c2c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions api/leancache.go
Expand Up @@ -90,13 +90,8 @@ type LeanCacheInstance struct {
func GetInstanceList(appID string) ([]*LeanCacheInstance, error) {
client := NewClientByApp(appID)

opts, err := client.options()
if err != nil {
return nil, err
}

url := fmt.Sprintf("/1.1/leandb/apps/%s/clusters", appID)
resp, err := client.get(url, opts)
resp, err := client.get(url, nil)
if err != nil {
return nil, err
}
Expand All @@ -115,15 +110,10 @@ func GetInstanceList(appID string) ([]*LeanCacheInstance, error) {
func ExecuteInstanceCommand(appID string, instance string, db int, command string) (*ExecuteCacheCommandResult, error) {
client := NewClientByApp(appID)

opts, err := client.options()
if err != nil {
return nil, err
}

url := fmt.Sprintf("/1.1/leandb/clusters/%s/user-command/exec", instance)
resp, err := client.post(url, map[string]interface{}{
"db": db,
"command": command}, opts)
"command": command}, nil)

if err != nil {
return nil, err
Expand Down

0 comments on commit b459c2c

Please sign in to comment.