Display the API keys

This commit is contained in:
Dane Everitt 2020-03-22 18:25:29 -07:00
parent 933a4733e8
commit 3ef649d984
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 42 additions and 3 deletions

View file

@ -19,7 +19,7 @@ export const rawDataToApiKey = (data: any): ApiKey => ({
export default (): Promise<ApiKey[]> => {
return new Promise((resolve, reject) => {
http.get('/api/client/account/api-keys')
.then(({ data }) => resolve((data.data || []).map(rawDataToApiKey)))
.then(({ data }) => resolve((data.data || []).map((d: any) => rawDataToApiKey(d.attributes))))
.catch(reject);
});
};