Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Changes to modify user hooks to allow various scenarios #9143

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

hanzlamateen
Copy link
Member

@hanzlamateen hanzlamateen commented Oct 25, 2023

Summary

🤖 Generated by Copilot at 3f35e44

This pull request adds a new feature and some helper hooks to the user service. The feature allows skipping the hooks for internal calls by setting a skipServiceHooks param. The helper hooks are execute-service-hooks, is-path, and is-skip-service-hooks, which are used to conditionally run or skip hooks based on the context.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 3f35e44

  • Add a hook function to execute service hooks based on the service path and the context type and method (link)
  • Add a hook function to check if the context path matches any of the the given parameters (link)
  • Add a hook function to check if the context params have a skipServiceHooks property set to true (link)
  • Use the iffElse function from feathers-hooks-common to conditionally execute the existing hooks in the user service based on the result of the isSkipServiceHooks function (link, link, link)

🤖 Generated by Copilot at 3f35e44

To skip hooks for internal calls
The user service now installs
Two functions imported
iffElse and isSkipServiceHooks
And some new files for other protocols

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@hanzlamateen hanzlamateen marked this pull request as ready for review October 26, 2023 10:27
@hanzlamateen
Copy link
Member Author

Merging this PR for now, as I need to deploy these changes. If any concerns, they can be addressed in a separate PR.

@hanzlamateen hanzlamateen merged commit b6813f9 into dev Oct 26, 2023
11 of 13 checks passed
@hanzlamateen hanzlamateen deleted the domain-user-flow branch October 26, 2023 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant