Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/dataset-keys'
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Breznicky committed Jun 1, 2017
2 parents 764f36d + 68aff0f commit caf0a30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/actions/SubscriptionChangeActions.es
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export function saveSubscriptionChanges() {
if (changeData.subscriptionAction === 'UNSUBSCRIBE') {
const subscription = currentState.subscriptions.subscriptionsById[changeData.subscriptionId].subscription
const subscriptionArn = subscription.subscriptionArn
const subscriptionLid = subscription.lid
promiseQueue.push(sns.unsubscribe({SubscriptionArn: subscriptionArn}).promise()
.then((data) => {
dispatch(subscriptionUpdated(changeData.id, data.ResponseMetadata.RequestId))
Expand All @@ -151,7 +152,7 @@ export function saveSubscriptionChanges() {
dispatch(updateSubscriptionsError(err))
})
)
promiseQueue.push(FloodAppUser.unsubscribe(subscriptionArn))
promiseQueue.push(FloodAppUser.unsubscribe(subscriptionLid))
}

// Process subscribe requests
Expand Down
2 changes: 1 addition & 1 deletion src/util/User.es
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class FloodAppUser extends AppUser {
const client = new this.AWS.CognitoSyncManager()
client.openOrCreateDataset(this.dataset, (err, dataset) => {
if (err) store.dispatch(sendErrorReport(err))
dataset.put(subscriptionData.subscriptionArn, stringData, (putError) => {
dataset.put(subscriptionData.lid, stringData, (putError) => {
if (putError) {
store.dispatch(sendErrorReport(putError))
reject(putError)
Expand Down

0 comments on commit caf0a30

Please sign in to comment.