Api v3 members port (#7109)

* Ported groups service to user new api v3 and ported dependent controllers

* Remove  and extra remove inviation code. Fixed group service caching and update group service tests

* Fixed test logic and added party cache support

* Updated members service to use api v3

* Removed onlys

* Added invites to group detail

* Removed old user reject invite code
This commit is contained in:
Keith Holliday
2016-04-30 02:54:25 -06:00
committed by Matteo Pagliazzi
parent 570d5c7fd9
commit 415418f30c
7 changed files with 196 additions and 70 deletions

View File

@@ -150,12 +150,20 @@ window.habitrpg = angular.module('habitrpg',
url: '/:gid',
templateUrl: 'partials/options.social.guilds.detail.html',
title: env.t('titleGuilds'),
controller: ['$scope', 'Groups', 'Chat', '$stateParams',
function($scope, Groups, Chat, $stateParams){
controller: ['$scope', 'Groups', 'Chat', '$stateParams', 'Members',
function($scope, Groups, Chat, $stateParams, Members){
Groups.Group.get($stateParams.gid)
.then(function (response) {
$scope.group = response.data.data;
Chat.markChatSeen($scope.group._id);
Members.getGroupMembers($scope.group._id)
.then(function (response) {
$scope.group.members = response.data.data;
});
Members.getGroupInvites($scope.group._id)
.then(function (response) {
$scope.group.invites = response.data.data;
});
});
}]
})