Reconcile the /papers API with what the UI expects
@@ -128,13 +128,8 @@ export const plugin = {
});
const data = (await s2Api.getPapers(uniqueIds, config.s2.apiKey))
.filter((paper) => paper !== undefined)
- .map((paper) => paper as Paper)
- .map((paper) => ({
- id: paper.s2Id,
- type: "paper",
- attributes: paper,
- }));
- return { data };
+ .map((paper) => paper as Paper);
+ return data;
},
options: {
validate: {
