// Use the Report $resource to fetch all reports
Report.query(function (reports) {
$scope.reports = reports;
- socket.syncUpdates('report:' + userId, $scope.reports);
+ socket.syncUpdates('report', $scope.reports);
});
// Use the User $resource to fetch all users
};
$scope.$on('$destroy', function () {
- socket.unsyncUpdates('report:' + userId);
+ socket.unsyncUpdates('report');
});
});