CEC-2579 Add ability to edit manifest (#226)
This commit is contained in:
@@ -57,6 +57,13 @@ const manifestsAPI = {
|
||||
return { statuses: [] };
|
||||
},
|
||||
|
||||
updateManifest: async (id, data, token) => {
|
||||
return {
|
||||
id,
|
||||
...data,
|
||||
}
|
||||
},
|
||||
|
||||
getManifest: async (id, token) => {
|
||||
return {
|
||||
id,
|
||||
|
||||
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user