3 var groupService
= require('gitter-web-groups/lib/group-service');
5 // Based on ./server/serializers/rest/troupes/favourite-troupes-for-user-strategy.js
6 function FavouriteGroupsForUserStrategy(options
) {
7 this.userId
= options
&& (options
.userId
|| options
.currentUserId
);
11 FavouriteGroupsForUserStrategy
.prototype = {
14 .findFavouriteGroupsForUser(this.userId
)
16 .then(function(favs
) {
22 var favs
= this.favs
[id
];
23 if (!favs
) return undefined;
24 if (favs
=== '1') return 1000;
28 name
: 'FavouriteGroupsForUserStrategy'
31 module
.exports
= FavouriteGroupsForUserStrategy
;