Skip to content

Commit 23a5d59

Browse files
committed
Bug fixes done and tested with new API controllers in App.
1 parent 0a4a4a1 commit 23a5d59

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

source/sloopengine/resource/credential.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ def __init__(self):
2020
'url':main_conf['account']['url']
2121
}
2222
self.user = {
23-
'api_key':{
24-
'id':credential_conf['user']['api_key']['id'],
25-
'token':credential_conf['user']['api_key']['token']
26-
}
23+
'token':credential_conf['user']['token']
2724
}
2825

2926
# Create Credential.
@@ -111,14 +108,13 @@ def get(self,data):
111108
)
112109
headers = {
113110
'Authorization':''.join(
114-
'SloopEngine %s:%s'
115-
%(self.user['api_key']['id'],self.user['api_key']['token'])
111+
'%s' %(self.user['token'])
116112
)
117113
}
118114
request = requests.get(url,headers=headers)
119115
response = request.json()
120116
if request.status_code==200 and response['status']=='success':
121-
credential_data = response['result']['credential']
117+
credential_data = response['result']
122118
else:
123119
return
124120
except Exception as error:

0 commit comments

Comments
 (0)