Skip to content

fix: allow queries to /api/opensearch/suggestions#1016

Merged
danielroe merged 3 commits intomainfrom
fix/isr-search-query
Feb 5, 2026
Merged

fix: allow queries to /api/opensearch/suggestions#1016
danielroe merged 3 commits intomainfrom
fix/isr-search-query

Conversation

@danielroe
Copy link
Copy Markdown
Member

resolves #1001

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 5, 2026 0:06am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 0:06am
npmx-lunaria Ignored Ignored Feb 5, 2026 0:06am

Request Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Added a route rule for /api/opensearch/suggestions in nuxt.config.ts configuring ISR with a 1‑day expiration, enabling passQuery and limiting accepted query parameters to ['q']. The server API handler server/api/opensearch/suggestions.get.ts was changed from exporting a cached event handler to a plain event handler (defineCachedEventHandler(...)defineEventHandler(...)), removing the caching wrapper while preserving input validation, request to the registry, and suggestion mapping logic.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description references a specific issue (#1001) and is directly related to the changeset which fixes the OpenSearch suggestions route.
Linked Issues check ✅ Passed The PR successfully addresses the primary objective from #1001: the nuxt.config.ts adds passQuery configuration to accept the 'q' parameter, and server handler changes from cached to plain event handler to properly handle the query parameter.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the OpenSearch suggestions endpoint; modifications to nuxt.config.ts and the suggestions handler align with issue #1001's requirements without introducing unrelated functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/isr-search-query

Comment @coderabbitai help to get the list of available commands and usage tips.

@danielroe danielroe merged commit 29137bc into main Feb 5, 2026
19 checks passed
@danielroe danielroe deleted the fix/isr-search-query branch February 5, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenSearch suggestions route appears to be broken

1 participant