v3 client: fix ability to leave challenge

This commit is contained in:
Matteo Pagliazzi
2016-05-15 12:12:19 +02:00
parent 4c056426e8
commit 0f7964cac1

View File

@@ -277,7 +277,7 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
if (keep == 'cancel') {
$scope.selectedChal = undefined;
} else {
Challenges.leaveChallenge(challenge._id, keep)
Challenges.leaveChallenge($scope.selectedChal._id, keep)
.then(function (response) {
_getChallenges()
});