return new Promise((resolve, reject) => {
fetch(`/api/items/create/`)
.then(response => response.json())
.then(() => {
resolve();
})
.catch((err) => {
window.console.error(err);
reject();
throw err;
});
});
return fetch(`/api/items/create/`)
.then(response => response.json())
.catch((err) => {
window.console.error(err);
throw err;
});
});