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

createRequest assigns the wrong success callback #21

Open
DaDummy opened this issue Oct 21, 2018 · 0 comments
Open

createRequest assigns the wrong success callback #21

DaDummy opened this issue Oct 21, 2018 · 0 comments

Comments

@DaDummy
Copy link

DaDummy commented Oct 21, 2018

According to the comment in logSuccess the hello-world sample should use the broadcast functionality of PubSub to trigger the actual color change.

function logSuccess(hex, status) {
// we could also use the output to update the block synchronously here,
// but we want all views to get the same broadcast response at the same time.
twitch.rig.log('EBS request returned '+hex+' ('+status+')');
}

But due to createRequest pointing to updateBlock instead of logSuccess the current implementation effectively does not need broadcasts when tested with a single user.

function createRequest(type, method) {
return {
type: type,
url: 'https://localhost:8081/color/' + method,
success: updateBlock,
error: logError
}
}

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

1 participant