superdesk/superdesk-client-core

View on GitHub
scripts/apps/publish/controllers/DataConsistencyController.ts

Summary

Maintainability
A
0 mins
Test Coverage
DataConsistencyController.$inject = ['$scope', 'api'];
export function DataConsistencyController($scope, api) {
    $scope.consistency_records = null;

    function fetchConsistencyRecords() {
        var criteria = criteria || {};

        criteria.max_results = 200;
        return api.consistency.query(criteria);
    }

    $scope.reload = function() {
        fetchConsistencyRecords().then((data) => {
            $scope.consistency_records = data._items;
            $scope.lastRefreshedAt = new Date();
        });
    };

    $scope.reload();
}