Correct context uses
`doAPI`'s `context` does not work due to `WithContext` immutability. `Authenticate` and `RegisterApp` does not use `context` although they needs `context`, so their `context` does not work also. This commit fixes them and add test cases.
This commit is contained in:
parent
909a57c5ea
commit
fb53d41dd9
5 changed files with 100 additions and 2 deletions
1
apps.go
1
apps.go
|
@ -55,6 +55,7 @@ func RegisterApp(ctx context.Context, appConfig *AppConfig) (*Application, error
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req = req.WithContext(ctx)
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
resp, err := appConfig.Do(req)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue