-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: simplify done()
function
#647
feat: simplify done()
function
#647
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@@ -50,11 +50,11 @@ class HttpAdapter extends Adapter { | |||
}) | |||
return { | |||
promise, | |||
done: (val: boolean, code = 401, message = 'Unauthorized') => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you do the same for the WebSocket adapter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KhudaDad414 Sure :)
@ankur0904 do you need some help with this? |
@KhudaDad414 The current code don't have Please tell me if I am missing something. class HttpAdapter extends Adapter {
...
// code of done function
return {
promise,
done: (val: boolean) => {
if (val) {
resolveFunc(true)
} else {
rejectFunc({ code: 401, message: 'Unauthorized' })
}
}
}
...
} |
@ankur0904 ws adapter has the same code: glee/src/adapters/ws/server.ts Line 221 in 60484de
|
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Sorry, @KhudaDad414 I missed the |
@afzal442 this change will touch the docs. do you want to have look? |
Pull Request Test Coverage Report for Build 7265431969
💛 - Coveralls |
sure! I do. and thanks for reminder. |
So now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @ankur0904 for your contrib. 💪🏻 |
/rtm |
🎉 This PR is included in version 0.33.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks @KhudaDad414 @afzal442 for merging the PR. |
Description
done()
function to take only one inputbool
as input.Related issue(s)
Resolves #596