We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c37d64c commit 8550150Copy full SHA for 8550150
lib/routes/inspirehep/author.ts
@@ -19,7 +19,15 @@ export const route: Route = {
19
handler,
20
};
21
22
-export const getAuthorById = (id: string) => cache.tryGet(`inspirehep:author:${id}`, () => ofetch<AuthorResponse>(`${baseUrl}/api/authors/${id}`));
+export const getAuthorById = (id: string) =>
23
+ cache.tryGet(`inspirehep:author:${id}`, () =>
24
+ ofetch<AuthorResponse>(`${baseUrl}/api/authors/${id}`, {
25
+ headers: {
26
+ accept: 'application/vnd+inspire.record.ui+json',
27
+ },
28
+ parseResponse: JSON.parse,
29
+ })
30
+ );
31
32
async function handler(ctx) {
33
const id = ctx.req.param('id');
0 commit comments