From 59f511f51d65a052d4f34c315269b9a13b07d50c Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Tue, 23 Apr 2024 12:34:54 -0500 Subject: [PATCH] rename func for accurate pluralization --- backend/src/import-from-ss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/import-from-ss.js b/backend/src/import-from-ss.js index 93c776d..af450d6 100644 --- a/backend/src/import-from-ss.js +++ b/backend/src/import-from-ss.js @@ -80,7 +80,7 @@ const fetchAuthorPapers = async (authorId) => { return responseData.data; }; -const getOrCreateAuthor = async (paper) => Promise.mapSeries( +const getOrCreateAuthors = async (paper) => Promise.mapSeries( paper.authors.filter((x) => !!x.authorId), async ({ authorId }) => { // Check if we already have an account for each author @@ -111,7 +111,7 @@ const getOrCreateAuthor = async (paper) => Promise.mapSeries( ); const generatePost = async (paper) => { - const authorsInfo = await getOrCreateAuthor(paper); + const authorsInfo = await getOrCreateAuthors(paper); if (!authorsInfo.length) { throw new Error('Paper has no authors with id'); }