Skip to content

Commit

Permalink
Remove endpoints without title from API route pages
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Nov 27, 2024
1 parent d141550 commit 35f73b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/layout/api-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export function setApiRouteLayoutContext(
file.title = metadata.title
file.path = route.path
file.endpoints = route.endpoints
.filter(({ isUndocumented }) => !isUndocumented)
.filter(
({ isUndocumented, title }) => !isUndocumented || title.length === 0,
)
.map(({ path, name, description }) => ({
path,
name,
Expand Down

0 comments on commit 35f73b6

Please sign in to comment.