Blame view
app/partials/forgetPassword/forgetPassword.service.js
818 Bytes
8c144d34a
|
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 |
(function(){ 'use strict'; angular.module('acufuel') .service('forgetPasswordService', ['$q', '$http', 'BASE_URL', forgetPasswordService]); function forgetPasswordService($q, $http, BASE_URL) { this.recoverpassword = function(email) { var param = 'email='+ email; var deferred = $q.defer(); $http({ method : 'PUT', url : BASE_URL.url +'/user/recoverpassword', headers : {'Content-Type': 'application/x-www-form-urlencoded'}, data: param }) .then(function (result){ deferred.resolve(result.data); },function (result){ deferred.resolve(result.data); }) return deferred.promise; } } })(); |