Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Commit 7106b04

Browse files
author
Yvo
authored
Merge pull request #211 from apamildner/bugfix/fixing-guardian-mfa-api
Fixed minor bug when unmarshalling Policy string array
2 parents 1ba535b + 533f204 commit 7106b04

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

management/guardian.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func (m *MultiFactorManager) List(opts ...RequestOption) (mf []*MultiFactor, err
186186
//
187187
// See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_policies
188188
func (m *MultiFactorManager) Policy(opts ...RequestOption) (p *MultiFactorPolicies, err error) {
189-
err = m.Request("GET", m.URI("guardian", "policies"), p, opts...)
189+
err = m.Request("GET", m.URI("guardian", "policies"), &p, opts...)
190190
return
191191
}
192192

management/guardian_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ func TestGuardian(t *testing.T) {
2424
if err != nil {
2525
t.Error(err)
2626
}
27-
p, _ := m.Guardian.MultiFactor.Policy()
27+
p, err := m.Guardian.MultiFactor.Policy()
28+
if err != nil {
29+
t.Error(err)
30+
}
2831
t.Logf("%v\n", p)
2932
})
3033

0 commit comments

Comments
 (0)