Skip to content

Commit

Permalink
rename versionDois to preprintVersionDois and allow custom doi for ve…
Browse files Browse the repository at this point in the history
…rsion in preprint
  • Loading branch information
will-byrne committed Dec 9, 2024
1 parent e28243b commit ad9d38e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/manuscriptData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const evaluationUrl = (id: string) => `https://sciety.org/evaluations/hypothesis

const prepareManuscriptStructure = async (
id: string,
versionedDois: string[],
preprintVersionedDois: string[],
preprints: string[],
dates: Date[],
evaluationSummary: string,
Expand All @@ -88,7 +88,7 @@ const prepareManuscriptStructure = async (
authorResponse?: string,
authorResponseDate?: Date,
) => {
const gatheredPreprints = gatherPreprints(versionedDois, dates, preprints);
const gatheredPreprints = gatherPreprints(preprintVersionedDois, dates, preprints);
const [preprintNotRevised] = gatheredPreprints;

const evaluation = (reviewType: string, date: Date, participants: string[], contentUrl: string) => ({
Expand All @@ -115,14 +115,15 @@ const prepareManuscriptStructure = async (
versionPeerReviewDate?: Date,
versionAuthorResponse?: string,
versionAuthorResponseDate?: Date,
versionDoi?: string,
) => {
const [preprintDoi, preprintVersionIdentifier] = preprintVersionedDoi.split('v');
const results = await bioxriv(preprintVersionedDoi);
const content = results.map((result) => result.content);

return {
id: versionId,
doi: preprintDoi,
doi: versionDoi || preprintDoi,
publishedDate: formatDate(date),
versionIdentifier,
preprint: {
Expand Down

0 comments on commit ad9d38e

Please sign in to comment.