Blame view

app/views/fbo-flight/flightDeptService.js 1.06 KB
5c6477d3d   Rishav   Admin Acufuel set...
1
2
  (function() {
    'use strict';
9835dbe3e   Rishav   module name changes
3
    angular.module('acuefuel')
7379f005b   Rishav   FBO client page d...
4
        .service('FBOFlight', ['$rootScope', '$q', '$http', 'BE', FBOFlight])
5c6477d3d   Rishav   Admin Acufuel set...
5

7379f005b   Rishav   FBO client page d...
6
     function FBOFlight($rootScope, $q, $http, BE) {
5c6477d3d   Rishav   Admin Acufuel set...
7
8
9
10
11
12
  
          this.registerUser = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'POST',
7379f005b   Rishav   FBO client page d...
13
                url : BE.url +'/account/user/registration',
5c6477d3d   Rishav   Admin Acufuel set...
14
15
16
17
18
19
20
21
                headers : {'Content-Type': 'application/x-www-form-urlencoded'},
                data : data
            })
            .success(function(result) {
                deferred.resolve(result);
            })
            return deferred.promise;
          }
7379f005b   Rishav   FBO client page d...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  
          this.addCardInformation = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'POST',
                url : BE.url +'/account/user/addPaymentMethods',
                headers : {'Content-Type': 'application/json'},
                data : data
            })
            .success(function(result) {
                deferred.resolve(result);
            })
            return deferred.promise;
          }
5c6477d3d   Rishav   Admin Acufuel set...
37
38
39
     }
  
  })();