Created
June 9, 2017 21:52
-
-
Save matthieu-D/5878be684fab0b26e2d000906bfa3c19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deleteTask(task, index) { | |
let self = this; | |
this.db.getDocumentClient().delete({ | |
'TableName': self.taskTable, | |
'Key': { | |
'userId': AWS.config.credentials.identityId, | |
'taskId': task.taskId | |
} | |
}).promise().then((data) => { | |
this.items.splice(index, 1); | |
}).catch((err) => { | |
console.log('there was an error', err); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment