Skip to content

Commit

Permalink
fix: format to index of hono (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
soartec-lab authored May 13, 2024
1 parent db7de2f commit 5581edf
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/hono/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,17 @@ const getHandlerFix = ({
const getVerbOptionGroupByTag = (
verbOptions: Record<string, GeneratorVerbOptions>,
) => {
return Object.values(verbOptions).reduce((acc, value) => {
const tag = value.tags[0];
if (!acc[tag]) {
acc[tag] = [];
}
acc[tag].push(value);
return acc;
}, {} as Record<string, GeneratorVerbOptions[]>);
return Object.values(verbOptions).reduce(
(acc, value) => {
const tag = value.tags[0];
if (!acc[tag]) {
acc[tag] = [];
}
acc[tag].push(value);
return acc;
},
{} as Record<string, GeneratorVerbOptions[]>,
);
};

const generateHandlers = async (
Expand Down

0 comments on commit 5581edf

Please sign in to comment.