Fix: wrong use of Events.record function

This commit is contained in:
Arik Fraimovich 2017-02-15 21:52:24 +02:00
parent f732f30bf0
commit 3981c1c8a7
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ function DashboardCtrl($rootScope, $routeParams, $location, $timeout, $q, $uibMo
};
this.togglePublished = () => {
Events.record(currentUser, 'toggle_published', 'dashboard', this.dashboard.id);
Events.record('toggle_published', 'dashboard', this.dashboard.id);
this.dashboard.is_draft = !this.dashboard.is_draft;
this.saveInProgress = true;
Dashboard.save({

View File

@ -157,7 +157,7 @@ function QueryViewCtrl($scope, Events, $route, $routeParams, $http, $location, $
};
$scope.togglePublished = () => {
Events.record(currentUser, 'toggle_published', 'query', $scope.query.id);
Events.record('toggle_published', 'query', $scope.query.id);
$scope.query.is_draft = !$scope.query.is_draft;
$scope.saveQuery(undefined, { is_draft: $scope.query.is_draft });
};