Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor $__registerHooksFromSchema #2754

Closed
vkarpov15 opened this issue Mar 11, 2015 · 6 comments
Closed

Refactor $__registerHooksFromSchema #2754

vkarpov15 opened this issue Mar 11, 2015 · 6 comments
Milestone

Comments

@vkarpov15
Copy link
Collaborator

$__registerHooksFromSchema is currently a tangled mess to make promises and hooks play nicely together. Would be great if we could move promise support into kareem and solve this is a more elegant way.

@vkarpov15 vkarpov15 added this to the 4.1 milestone Mar 11, 2015
@vkarpov15 vkarpov15 added the enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature label Mar 12, 2015
@vkarpov15
Copy link
Collaborator Author

Also will be related to #2688

@puzrin
Copy link

puzrin commented Jan 19, 2016

Will this issue cover support of "thenable" pre-hooks (hooks than returns promise instead of calling next())?

I could not find any info about such use of pre-hooks, only some mentions about post hooks.

@vkarpov15
Copy link
Collaborator Author

Not necessarily. That's a separate feature, although mongoosejs/kareem#3 would help us do that. I haven't had a chance to take a look at grappling-hook yet though.

@puzrin
Copy link

puzrin commented Jan 20, 2016

Ok, then consider as request please, that it would be cool to tech hooks understand promises instead of callbacks. Should i create a new issue for that?

@vkarpov15
Copy link
Collaborator Author

Please do :)

@vkarpov15
Copy link
Collaborator Author

Consider this a follow-on to #4821

vkarpov15 added a commit that referenced this issue Jan 2, 2017
vkarpov15 added a commit that referenced this issue Jan 2, 2017
@vkarpov15 vkarpov15 changed the title Refactor $__registerHooksFromSchema, replace hooks with kareem for save, validate, remove Refactor $__registerHooksFromSchema Jan 4, 2017
@vkarpov15 vkarpov15 added fixed? and removed enhancement This issue is a user-facing general improvement that doesn't fix a bug or add a new feature labels Jan 4, 2017
vkarpov15 added a commit that referenced this issue Jan 4, 2017
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

No branches or pull requests

3 participants