account.svc.js 1.49 KB
Newer Older
eddie.woo's avatar
eddie.woo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// registration web service proxy
webservices.factory('accountService', ['$http', 'apiConfig', function ($http, apiConfig) {
    'use strict';
    return {
        getAccountDemoOne: function (accountId) {
            var config = { ignoreLoadingBar: true };
            return $http.get('/NewAccount/' + accountId, apiConfig.create(config));
        },
        getAccountDemoList: function () {
            var config = { ignoreLoadingBar: true };
            return $http.get('/NewAccount', apiConfig.create(config));
        },
        getAccountGroup : function(){
            var config = { ignoreLoadingBar: true };
            return $http.get('/AccountGroup', apiConfig.create(config));
        },
        getProjectList: function (){
            return $http.get('/Account/UserProjects', apiConfig.create());
        },
        getEnterpriseAccounts: function (){
            return $http.get('/EnterpriseAccount', apiConfig.create());
        },
        mapAccount: function (accountMap){
            return $http.post('/EnterpriseAccount/Map', accountMap, apiConfig.create());
        },
        clearAccountMap: function (codes){
            return $http.post('/EnterpriseAccount/ClearMap', codes, apiConfig.create());
        },
        clearAllAccountMap: function (){
            return $http.post('/EnterpriseAccount/ClearAllMap', {},apiConfig.create());
        },
        autoMap: function () {
            return $http.post('/EnterpriseAccount/AutoMap', {}, apiConfig.create());
        }
    };
}]);