mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 15:04:59 +00:00
chore(frontend): changed source code to src folder from root
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import SecurityClient from '~/utilities/SecurityClient';
|
||||
/**
|
||||
* This route deletes a specified env.
|
||||
* @param {*} workspaceId
|
||||
* @returns
|
||||
*/
|
||||
const deleteEnvironment = (workspaceId: string, environmentSlug: string) => {
|
||||
return SecurityClient.fetchCall(
|
||||
`/api/v2/workspace/${workspaceId}/environments`,
|
||||
{
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ environmentSlug }),
|
||||
}
|
||||
).then(async (res) => {
|
||||
if (res && res.status == 200) {
|
||||
return res;
|
||||
} else {
|
||||
console.log('Failed to delete environment');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export default deleteEnvironment;
|
||||
Reference in New Issue
Block a user