I have a previous message for an error 400. It's still not solved.
Now I tried copying the code that appears in the demo service for DSpace 8
and i still got a status error 400.
This is the code:
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 formUrl = `
https://api-new-bcnroc.metricsalad.com/api/submission/workspaceitems/${id}`;
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);
Do you have any idea why it fails?
--
All messages to this mailing list should adhere to the Code of Conduct:
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/dspace-tech/8717a237-2787-4397-9dca-ae61482e514cn%40googlegroups.com.