mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 20:28:54 +00:00
23 lines
521 B
TypeScript
23 lines
521 B
TypeScript
import SecurityClient from '@app/components/utilities/SecurityClient';
|
|
|
|
/**
|
|
* This route gets API keys for the user
|
|
* @param {*} param0
|
|
* @returns
|
|
*/
|
|
const getAPIKeys = () =>
|
|
SecurityClient.fetchCall('/api/v2/api-key', {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
}).then(async (res) => {
|
|
if (res && res.status === 200) {
|
|
return (await res.json()).apiKeyData;
|
|
}
|
|
console.log('Failed to get API keys');
|
|
return undefined;
|
|
});
|
|
|
|
export default getAPIKeys;
|