Skip to content

Commit

Permalink
updated get_secret endpoint to return value
Browse files Browse the repository at this point in the history
  • Loading branch information
marjo-luc committed Aug 29, 2024
1 parent 5e4cf56 commit dfc6cd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion maap/Secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_secret(self, secret_name=None):
secret_name (str, required): Secret name.
Returns:
dict: Secret name and value.
string: Secret value.
Raises:
ValueError: If secret name is not provided.
Expand All @@ -57,6 +57,10 @@ def get_secret(self, secret_name=None):
headers=self._api_header
)

if response.ok:
response = response.json()
return response["secret_value"]

return json.loads(response.text)

except Exception as ex:
Expand Down

0 comments on commit dfc6cd7

Please sign in to comment.