Skip to content

Commit

Permalink
connect: fix wrong endpoints callbacks
Browse files Browse the repository at this point in the history
In be07afd ("Introduce Consul Connect-related API wrappers")
multiple endpoint callbacks were associated to the wrong callback
type, resulting in boolean results where json payload is expected.
  • Loading branch information
pierrecdn committed Feb 5, 2021
1 parent b756eb5 commit d5b512b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions consul/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ def authorize(
params.append(('token', token))

return self.agent.http.put(
CB.bool(),
CB.json(),
'/v1/agent/connect/authorize',
params=params,
data=json.dumps(payload))
Expand All @@ -1190,7 +1190,7 @@ def leaf(self, service, token=None):
params.append(('token', token))

return self.agent.http.get(
CB.bool(),
CB.json(),
'/v1/agent/connect/ca/leaf/%s' % service,
params=params)

Expand Down Expand Up @@ -2617,7 +2617,7 @@ def roots(self, pem=False, token=None):
params.append(('token', token))

return self.agent.http.get(
CB.bool(),
CB.json(),
'/v1/connect/ca/roots',
params=params)

Expand All @@ -2628,6 +2628,6 @@ def configuration(self, token=None):
params.append(('token', token))

return self.agent.http.get(
CB.bool(),
CB.json(),
'/v1/connect/ca/configuration',
params=params)

0 comments on commit d5b512b

Please sign in to comment.