counter update in rooms fixed

parent e3be7077
......@@ -1447,7 +1447,6 @@ module.exports = {
sails.hooks.rooms.getUICount(room, (info) => {
res.ok(info);
});
},
//
......
......@@ -74,10 +74,9 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
token: $window.sessionStorage.token
},
function (data) {
console.log(JSON.stringify(data));
if (data.room.search('student') != -1) {
$scope.studentData.pcb_count = data.pcb_count;
$scope.studentData.pdb_count = data.pdb_count;
$scope.studentData.pdb_count = data.pdb_count == 0 ? 1 : data.pdb_count; // because subscription is fastar than counter update
$scope.$apply();
ngToast.success($translate.instant('subscribed'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment