make the ssh auth call with the correct operation

This commit is contained in:
risk danger olson 2015-09-01 16:05:54 -06:00
parent ce18a1d11f
commit 99f1956fb0

@ -184,7 +184,7 @@ func Batch(objects []*objectResource, operation string) ([]*objectResource, erro
return nil, Error(err)
}
req, err := newBatchApiRequest()
req, err := newBatchApiRequest(operation)
if err != nil {
return nil, Error(err)
}
@ -613,13 +613,13 @@ func newClientRequest(method, rawurl string, header map[string]string) (*http.Re
return req, nil
}
func newBatchApiRequest() (*http.Request, error) {
func newBatchApiRequest(operation string) (*http.Request, error) {
endpoint := Config.Endpoint()
res, err := sshAuthenticate(endpoint, "download", "")
res, err := sshAuthenticate(endpoint, operation, "")
if err != nil {
tracerx.Printf("ssh: attempted with %s. Error: %s",
endpoint.SshUserAndHost, err.Error(),
tracerx.Printf("ssh: %s attempted with %s. Error: %s",
operation, endpoint.SshUserAndHost, err.Error(),
)
}