const body1 = JSON.stringify({
id: id,
type: "workspaceitem",
lastModified: "2025-04-10T09:33:23.893+00:00",
sections: {
collection: coleccio.uuid,
license: {
url: null,
acceptanceDate: null,
granted: false,
},
upload: {
primary: null,
files: [],
},
traditionalpagetwo: {
"dc.description.abstract": [
{
value:
"DSpace 7.0 was released on Aug 2, 2021. Give it a try, or better yet, try the latest 7.x release out there!",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
},
traditionalpageone: {
"dc.publisher": [
{
value: "DSpace software",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
"dc.contributor.author": [
{
value: "DSpace Committers",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
"dc.type": [
{
value: "Software",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
"dc.title": [
{
value: "DSpace 7 is pretty amazing",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
"dc.date.issued": [
{
value: "2021-11-02",
language: null,
authority: null,
confidence: -1,
place: 0,
},
],
},
},
});
const formResponse = await fetch(formUrl, {
method: "PATCH",
headers: {
Authorization: bearerToken ?? "",
Cookie: xsrfCookie,
"Content-Type": "application/json",
"X-XSRF-TOKEN": csrfToken ?? "",
},
body: body1,
});
console.log(formResponse);