Add context to DecortAPICall method

This commit is contained in:
stSolo
2022-06-29 16:22:31 +03:00
parent 3613bbea28
commit 9a7642cf33
114 changed files with 406 additions and 390 deletions

View File

@@ -21,6 +21,7 @@ package controller
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"io/ioutil"
@@ -325,7 +326,7 @@ func (config *ControllerCfg) validateLegacyUser() (bool, error) {
return true, nil
}
func (config *ControllerCfg) DecortAPICall(method string, api_name string, url_values *url.Values) (json_resp string, err error) { //nolint:unparam
func (config *ControllerCfg) DecortAPICall(ctx context.Context, method string, api_name string, url_values *url.Values) (json_resp string, err error) { //nolint:unparam
// This is a convenience wrapper around standard HTTP request methods that is aware of the
// authorization mode for which the provider was initialized and compiles request accordingly.