chore(frontend): fixed all eslint errors

This commit is contained in:
akhilmhdh
2023-01-17 20:53:35 +05:30
parent 9f82e2d836
commit cf7834bfc3
184 changed files with 6255 additions and 6117 deletions

View File

@@ -1,4 +1,4 @@
import SecurityClient from '~/utilities/SecurityClient';
import SecurityClient from '@app/components/utilities/SecurityClient';
/**
* This function performs a rollback of secrets in a certain project
@@ -7,24 +7,27 @@ import SecurityClient from '~/utilities/SecurityClient';
* @param {number} obj.version - version to which we are rolling back
* @returns
*/
const performSecretRollback = async ({ workspaceId, version }: { workspaceId: string; version: number; }) => {
return SecurityClient.fetchCall(
'/api/v1/workspace/' + workspaceId + "/secret-snapshots/rollback", {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
version
})
}
).then(async (res) => {
if (res && res.status == 200) {
return (await res.json());
} else {
console.log('Failed to perform the secret rollback');
const performSecretRollback = async ({
workspaceId,
version
}: {
workspaceId: string;
version: number;
}) =>
SecurityClient.fetchCall(`/api/v1/workspace/${workspaceId}/secret-snapshots/rollback`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
version
})
}).then(async (res) => {
if (res && res.status === 200) {
return res.json();
}
console.log('Failed to perform the secret rollback');
return undefined;
});
};
export default performSecretRollback;