1/* global chipoweb, baseUrl */ 2 3chipoweb.factory('UserService', function ($http) { 4 var self = {}; 5 self.register = function (uData) { 6 return $http({ 7 url: SIGNUP_URL, 8 method: "POST", 9 ContentType: 'json', 10 data: uData, 11 headers: { 12 "sourcetype": "WEB_API" 13 } 14 }); 15 }; 16 self.get = function (token) { 17 return $http({ 18 url: USER_PROFILE, 19 method: "GET", 20 headers: { 21 "authorization": token, 22 } 23 }); 24 }; 25 self.login = function (uData) { 26 return $http({ 27 url: SIGNIN_URL, 28 method: "POST", 29 ContentType: 'json', 30 data: uData, 31 }); 32 }; 33 self.recover = function (data) { 34 return $http({ 35 url: RESET_PASSWORD, 36 method: "POST", 37 data: data, 38 }); 39 }; 40 41 self.lostPass = function (input) { 42 return $http({ 43 url: LOST_PASS, 44 method: "POST", 45 data: input, 46 }); 47 }; 48 49 self.verify = function (code) { 50 return $http({ 51 url: VERIFY_ACCOUNT + '?code=' + code, 52 method: "GET", 53 }); 54 }; 55 56 self.exist = function (code) { 57 return $http({ 58 url: CODE_EXIST + '?code=' + code, 59 method: "GET", 60 }); 61 }; 62 self.loginFacebook = function (uData) { 63 return $http({ 64 url: LOGIN_FACEBOOK, 65 method: "POST", 66 data: uData 67 }); 68 }; 69 self.googleSignIn = function (token) { 70 return $http({ 71 url: LOGIN_GOOGLE, 72 method: "POST", 73 data: token 74 }); 75 }; 76 self.getBalance = function (token) { 77 return $http({ 78 url: CASH_BALANCE, 79 method: "GET", 80 headers: { 81 "authorization": token, 82 } 83 }); 84 }; 85 self.getWarehouse = function () { 86 return $http({ 87 url: GET_WAREHOUSE, 88 method: "GET", 89 90 }); 91 }; 92 self.registerByFacebook = function (uData) { 93 return $http({ 94 url: REGISTER_FACEBOOK, 95 method: "POST", 96 data: uData 97 }); 98 }; 99 self.registerByGoogle = function (uData) { 100 return $http({ 101 url: REGISTER_GOOGLE, 102 method: "POST", 103 data: uData 104 }); 105 }; 106 self.inactivate = function (input) { 107 return $http({ 108 url: DELETE_ACCOUNT, 109 method: "POST", 110 data: input 111 }); 112 }; 113 self.addMarketingStatic = function (data) { 114 return $http({ 115 url: CREATE_MARKETING_STATIC+'?type=1', 116 data: data, 117 method: "POST" 118 }); 119 }; 120 return self; 121});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.