Skip to content

add return promise function checkBasicAuth#8

Open
JaosnHsieh wants to merge 1 commit intojchiatt:masterfrom
JaosnHsieh:return-promise-for-await
Open

add return promise function checkBasicAuth#8
JaosnHsieh wants to merge 1 commit intojchiatt:masterfrom
JaosnHsieh:return-promise-for-await

Conversation

@JaosnHsieh
Copy link

Thank you for the nice repo!

Add return promise so the below await would really work.

// some-route.js
export async function getServerSideProps(ctx) {
const {req, res} = ctx

await basicAuthCheck(req, res)

return {
props: {}
}
}

surajmandalcell added a commit to archive-smc/nextjs-basic-auth2 that referenced this pull request Oct 11, 2022
- Fix "add return promise function checkBasicAuth" - "jchiatt#8"
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