CEC-775 Manifest details component (#114)

* CEC-775 Manifest details component

* Code smells

* Fix build warning
This commit is contained in:
John Wu
2022-01-17 08:59:55 -08:00
committed by GitHub
parent cb5035cf96
commit a858b842c6
9 changed files with 467 additions and 6 deletions

View File

@@ -16,6 +16,17 @@ const manifestsAPI = {
),
}).then(fetchRespHandler),
getManifest: async (id, token) => {
const u = addQueryParams(`${API_ENDPOINT}/manifest`, { id });
return fetch(u, {
method: "GET",
headers: Object.assign(
{ "Content-Type": "application/json" },
getAuthHeaderOptions(token)
),
}).then(fetchRespHandler);
},
getManifests: async (search, token) => {
const u = addQueryParams(`${API_ENDPOINT}/manifests`, search);
return fetch(u, {