Ported groups service to user new api v3 and ported dependent controllers (#7108)

* 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

* Added promise rejections and updated http interceptor
This commit is contained in:
Keith Holliday
2016-04-25 16:11:23 -05:00
committed by Matteo Pagliazzi
parent f2d5c921ed
commit ea490c9a1f
15 changed files with 565 additions and 210 deletions

View File

@@ -102,14 +102,14 @@ angular.module('habitrpg')
op(req,function(err,response) {
for(var updatedItem in req.body) {
var itemUpdateResponse = userNotifications[updatedItem];
if(itemUpdateResponse) Notification.text(itemUpdateResponse);
if(itemUpdateResponse) Notification.text(itemUpdateResponse.data.message);
}
if (err) {
var message = err.code ? err.message : err;
if (MOBILE_APP) Notification.push({type:'text',text:message});
var message = err.code ? err.data.message : err;
if (MOBILE_APP) Notification.push({type:'text', text: message});
else Notification.text(message);
// In the case of 200s, they're friendly alert messages like "Your pet has hatched!" - still send the op
if ((err.code && err.code >= 400) || !err.code) return;
if ((err.code && err.code >= 400) || !err.code) return;
}
userServices.log({op:k, params: req.params, query:req.query, body:req.body});
});