Skip to content

Commit

Permalink
Make OAI response compliant with https://validator.oaipmh.com/
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Aug 7, 2023
1 parent 3b4beec commit e73213e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/handlers/oai/verbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function header(work) {
fields = {
...fields,
setSpec: work.collection.id,
setName: work.collection.title,
};
}

Expand Down Expand Up @@ -120,9 +119,10 @@ const identify = async (url) => {
repositoryName: "Northwestern University Libraries",
baseURL: url,
protocolVersion: "2.0",
adminEmail: "[email protected]",
earliestDatestamp: earliestDatestamp,
deletedRecord: "no",
granularity: "YYYY-MM-DDThh:mm:ss.ffffffZ",
granularity: "YYYY-MM-DDThh:mm:ssZ",
},
},
};
Expand Down Expand Up @@ -177,7 +177,7 @@ const listIdentifiers = async (
_text: url,
},
ListIdentifiers: {
headers: { header: headers },
header: headers,
resumptionToken: resumptionTokenElement,
},
},
Expand Down Expand Up @@ -303,7 +303,10 @@ const listSets = async (url) => {

const sets = hits.map((hit) => {
const collection = hit._source;
return { setSpec: collection.id, setName: collection.title };
return {
setSpec: collection.id,
setName: collection.title,
};
});

const obj = {
Expand Down

0 comments on commit e73213e

Please sign in to comment.