Skip to content

Update Doc Service API middleware example - #2368

Merged
pwizla merged 1 commit into
strapi:mainfrom
Gkleinereva:patch-1
Jan 23, 2025
Merged

pwizla merged 1 commit into
strapi:mainfrom
Gkleinereva:patch-1

Conversation

@Gkleinereva

Copy link
Copy Markdown
Contributor

Added a line to the example code to better clarify how to mutate results in middleware before returning them (or passing them to other middleware down the chain).

Per the instructions, this PR is ready to be merged.

What does it do?

This PR improves the Document Service API middleware example to better convey how to mutate query results prior to returning them to the client or other downstream middleware.

Why is it needed?

I had trouble implementing result mutations during an upgrade to Strapi 5. I thought this change could help future explorers figure it out a little bit faster.

Related issue(s)/PR(s)

N/A

Added a line to the example code to better clarify how to mutate results in middleware before returning them (or passing them to other middleware down the chain).
@Gkleinereva
Gkleinereva requested a review from pwizla as a code owner January 22, 2025 22:50
@vercel

vercel Bot commented Jan 22, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 10:52pm

@strapi-cla

strapi-cla commented Jan 22, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@pwizla pwizla self-assigned this Jan 23, 2025
@pwizla pwizla added this to the 5.5.4 milestone Jan 23, 2025
@pwizla pwizla added source: Dev Docs PRs/issues targeting the Developer Docs pr: chore labels Jan 23, 2025

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Gkleinereva!
The PR is now approved, merged, should be live on docs.strapi.io in a few minutes, and will be mentioned in the next weekly snapshot release.

@pwizla
pwizla merged commit 3124d0f into strapi:main Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: chore source: Dev Docs PRs/issues targeting the Developer Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants