CEC-1050 New manifest format (#117)

* CEC-1050 Manifest changes

* Fix delete bug

* Add approve update button

* Code smell

* Remove update approval
This commit is contained in:
John Wu
2022-03-01 16:56:25 -08:00
committed by GitHub
parent a858b842c6
commit 3b9252097a
17 changed files with 155 additions and 346 deletions

View File

@@ -46,16 +46,16 @@ export const ManifestsProvider = ({ children }) => {
const deleteManifest = async (package_id, token) => {
let result;
const index = manifests.findIndex((element) => {
return element.id === package_id;
});
manifests.splice(index, 1);
try {
setBusy(true);
result = await api.deleteManifest(package_id, token);
if (result.error)
throw new Error(`Delete manifest error. ${result.message}`);
const index = manifests.findIndex((element) => {
return element.id === package_id;
});
manifests.splice(index, 1);
} finally {
setBusy(false);
}