Skip to content

createRequest assigns the wrong success callback #21

Description

@DaDummy

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
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions