Skip to content

enable match config support async function#39

Open
liuxiaogang wants to merge 2 commits intokoajs:masterfrom
liuxiaogang:master
Open

enable match config support async function#39
liuxiaogang wants to merge 2 commits intokoajs:masterfrom
liuxiaogang:master

Conversation

@liuxiaogang
Copy link
Copy Markdown

this mr enable match config support async function

match config now accept async function
match config now accept async function
return async function userauth(ctx, next) {
const loginRequired = !!needLogin(ctx.path, ctx);
let loginRequired = null;
if(is.asyncFunction(needLogin)){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please follow the code style.

and need a test case for these change.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

👌,I will do it later,thks

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.

3 participants