;
(function() {
    'use strict';

    const 
        apiService = require('app-service');

    angular.module('app.controllers')
        .controller('m_cancelShareCtr', m_cancelShareCtr);
         m_cancelShareCtr.$inject = ['$scope', '$mdDialog', 'files'];     
    return;

    function m_cancelShareCtr($scope, $mdDialog, files) {

        let vm = $scope;
        vm.content = '确定要取消分享吗？';
        vm.close= $mdDialog.cancel;
        vm.ok = function() {
            files.forEach((file) => {
                apiService.cancel_share(file._id);
            });
            $mdDialog.hide();
        }

    }
})();
