CEC-2579 Add ability to edit manifest (#226)

This commit is contained in:
arpanetus
2022-10-26 03:54:20 +06:00
committed by GitHub
parent aaf47f4cc7
commit 9a9766df12
11 changed files with 656 additions and 0 deletions

View File

@@ -32,6 +32,19 @@ const manifestsAPI = {
.catch(errorHandler);
},
updateManifest: async (manifest_id, data, token) => {
return fetch(`${API_ENDPOINT}/manifest?id=${manifest_id}`, {
method: "PUT",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
body: JSON.stringify(data),
})
.then(fetchRespHandler)
.catch(errorHandler);
},
getManifests: async (search, token) => {
const u = addQueryParams(`${API_ENDPOINT}/manifests`, search);
return fetch(u, {