Skip to content

Commit

Permalink
chores: Move function definitions to the highest possible scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
Derekmini committed Apr 9, 2024
1 parent d8236f5 commit 0b82f85
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/routes/ieee/journal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export const route: Route = {
handler,
};

const renderDesc = (item: any) =>
art(path.join(__dirname, 'templates/description.art'), {
item,
});

async function handler(ctx) {
const punumber = ctx.req.param('journal');
const sortType = ctx.req.param('sortType') ?? 'vol-only-seq';
Expand Down Expand Up @@ -79,10 +84,6 @@ async function handler(ctx) {
};
});

const renderDesc = (item: any) =>
art(path.join(__dirname, 'templates/description.art'), {
item,
});
list = await Promise.all(
list.map((item: any) =>
cache.tryGet(item.link, async () => {
Expand Down

0 comments on commit 0b82f85

Please sign in to comment.