This commit is contained in:
chris 2020-08-02 22:00:33 +02:00
parent ba0a210b09
commit 597f62fb77

View file

@ -1,6 +1,7 @@
# Copyright: (c) 2020, Chris Gebhardt <cg@zknt.org>
# 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,
)