diff --git a/source_control/gitea_organization.py b/source_control/gitea_organization.py index 321dcd5..c7bb490 100644 --- a/source_control/gitea_organization.py +++ b/source_control/gitea_organization.py @@ -1,6 +1,7 @@ # Copyright: (c) 2020, Chris Gebhardt # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +import json import requests ANSIBLE_METADATA = { @@ -110,7 +111,7 @@ def run_module(): gitea_token = module.params['auth_token'] username = module.params['username'] req_org = requests.get( - gitea_url + '/api/v1/orgs/' + username + + gitea_url + '/api/v1/orgs/' + username + '?access_token=' + gitea_token, headers=headers ) @@ -153,7 +154,7 @@ def run_module(): result['state'] = 'absent' if req_org.status_code == 200: delete_req = requests.delete( - gitea_url + '/api/v1/orgs/' + username + + gitea_url + '/api/v1/orgs/' + username + '?access_token=' + gitea_token, headers=headers, )