8000 docs: Update anonymous hook to support around hooks by howlettt · Pull Request #3379 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

docs: Update anonymous hook to support around hooks#3379

Merged
daffl merged 1 commit intofeathersjs:dovefrom
howlettt:allow-anonymous-around
Jan 5, 2024
Merged

docs: Update anonymous hook to support around hooks#3379
daffl merged 1 commit intofeathersjs:dovefrom
howlettt:allow-anonymous-around

Conversation

@howlettt
Copy link
Contributor
@howlettt howlettt commented Jan 4, 2024

The current anonymous hook in the documentation doesn't work with around hooks since it doesn't have the next param
https://feathersjs.com/cookbook/authentication/anonymous.html

return async (context: HookContext) => {

This PR adds a optional next param so it can be used in both before & around hooks, making it consistent with the authenticate hook
https://feathersjs.com/api/authentication/hook

It can be used as a before or around hook.

@daffl daffl changed the title Docs: Update anonymous hook to support around hooks docs: Update anonymous hook to support around hooks Jan 5, 2024
A32E
@daffl daffl merged commit 094056a into feathersjs:dove Jan 5, 2024
@daffl
Copy link
Member
daffl commented Jan 5, 2024

Thank you!

@howlettt howlettt deleted the allow-anonymous-around branch January 6, 2024 01:02
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.

2 participants

0