Skip to content

Commit

Permalink
Merge pull request #465 from ushahidi/category-visibility
Browse files Browse the repository at this point in the history
Visibility of categories
  • Loading branch information
rjmackay committed Dec 20, 2016
2 parents c83ca19 + 575e00a commit fe238c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/common/services/endpoints/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ function (
CacheFactory
) {
var cache;

if (!(cache = CacheFactory.get('tagCache'))) {
cache = new CacheFactory('tagCache');
}


var TagEndpoint = $resource(Util.apiUrl('/tags/:id'), {
id: '@id'
}, {
Expand Down Expand Up @@ -66,8 +66,12 @@ function (
return result;
};


$rootScope.$on('event:authentication:logout:succeeded', function () {
TagEndpoint.query();
TagEndpoint.queryFresh();
});
$rootScope.$on('event:authentication:login:succeeded', function () {
TagEndpoint.queryFresh();
});

return TagEndpoint;
Expand Down

0 comments on commit fe238c5

Please sign in to comment.