Blame view

app/views/fbo-admin/dashboard.service.js 1.13 KB
0a4eb77cc   Rishav   FBO admin impleme...
1
2
  (function() {
    'use strict';
9835dbe3e   Rishav   module name changes
3
    angular.module('acuefuel')
0a4eb77cc   Rishav   FBO admin impleme...
4
5
6
7
8
9
10
11
12
        .service('FBOAdmin', ['$rootScope', '$q', '$http', 'BE', FBOAdmin])
  
     function FBOAdmin($rootScope, $q, $http, BE) {
  
          this.registerUser = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'POST',
7379f005b   Rishav   FBO client page d...
13
                url : BE.url +'/account/user/registration',
0a4eb77cc   Rishav   FBO admin impleme...
14
15
16
17
18
                headers : {'Content-Type': 'application/x-www-form-urlencoded'},
                data : data
            })
            .success(function(result) {
                deferred.resolve(result);
1956e3844   Rishav   handle errors
19
20
            }).error(function(error){
              deferred.reject(error);
0a4eb77cc   Rishav   FBO admin impleme...
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
            })
            return deferred.promise;
          }
  
          this.featureControl = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'POST',
                url : BE.url +'/account/user/accountFeatureControl',
                headers : {'Content-Type': 'application/json'},
                data : data
            })
            .success(function(result) {
                deferred.resolve(result);
            })
            return deferred.promise;
          }
     }
  
  })();