Skip to content

Add createController and use for users. WIP#17

Open
rkatic wants to merge 3 commits intoEastCoastProduct:masterfrom
rkatic:nextless-controllers
Open

Add createController and use for users. WIP#17
rkatic wants to merge 3 commits intoEastCoastProduct:masterfrom
rkatic:nextless-controllers

Conversation

@rkatic
Copy link
Copy Markdown

@rkatic rkatic commented Jun 22, 2017

This is a demonstration how we can get rid of next callbacks in controllers.
A controller method that doesn't have next in its signature (less then 3 arguments), is "promisified".
Such method returns a promise (or value) for the response body.

Didn't have time to finish (add tests and so on), however it should be enough as a demonstration.

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.

1 participant