File tree 1 file changed +3
-7
lines changed
source/sloopengine/resource
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ def __init__(self):
20
20
'url' :main_conf ['account' ]['url' ]
21
21
}
22
22
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' ]
27
24
}
28
25
29
26
# Create Credential.
@@ -111,14 +108,13 @@ def get(self,data):
111
108
)
112
109
headers = {
113
110
'Authorization' :'' .join (
114
- 'SloopEngine %s:%s'
115
- % (self .user ['api_key' ]['id' ],self .user ['api_key' ]['token' ])
111
+ '%s' % (self .user ['token' ])
116
112
)
117
113
}
118
114
request = requests .get (url ,headers = headers )
119
115
response = request .json ()
120
116
if request .status_code == 200 and response ['status' ]== 'success' :
121
- credential_data = response ['result' ][ 'credential' ]
117
+ credential_data = response ['result' ]
122
118
else :
123
119
return
124
120
except Exception as error :
You can’t perform that action at this time.
0 commit comments