Files
habitica/website/client/js/controllers/tavernCtrl.js
Keith Holliday b378e41f2c Tavern party challenges invites fix (#7394)
* Added challenges and invitations to party

* Loaded tavern challenges

* Updated group and quest services tests
2016-05-21 17:26:34 +02:00

19 lines
527 B
JavaScript

'use strict';
habitrpg.controller("TavernCtrl", ['$scope', 'Groups', 'User', 'Challenges',
function($scope, Groups, User, Challenges) {
Groups.tavern()
.then(function (tavern) {
$scope.group = tavern;
Challenges.getGroupChallenges($scope.group._id)
.then(function (response) {
$scope.group.challenges = response.data.data;
});
})
$scope.toggleUserTier = function($event) {
$($event.target).next().toggle();
}
}
]);