Merge pull request #54 from thirdmartini/thirdmartini/fix-missing-post-params
Fix missing consumption of params in UniReqPost
This commit is contained in:
commit
29f65ddb01
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/unifi-poller/unifi"
|
"github.com/unpoller/unifi"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIPGeoUnmarshalJSON(t *testing.T) {
|
func TestIPGeoUnmarshalJSON(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/unifi-poller/unifi"
|
"github.com/unpoller/unifi"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFlexInt(t *testing.T) {
|
func TestFlexInt(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ func (u *Unifi) UniReqPut(apiPath string, params string) (*http.Request, error)
|
||||||
func (u *Unifi) UniReqPost(apiPath string, params string) (*http.Request, error) {
|
func (u *Unifi) UniReqPost(apiPath string, params string) (*http.Request, error) {
|
||||||
apiPath = u.path(apiPath)
|
apiPath = u.path(apiPath)
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodPost, u.URL+apiPath, bytes.NewBufferString("")) //nolint:noctx
|
req, err := http.NewRequest(http.MethodPost, u.URL+apiPath, bytes.NewBufferString(params)) //nolint:noctx
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("creating request: %w", err)
|
return nil, fmt.Errorf("creating request: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue