Blame view
app/partials/resetpwd/resetPassword.service.js
874 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 |
(function(){ 'use strict'; angular.module('acufuel') .service('ResetPasswordService', ['$q', '$http', 'BASE_URL', ResetPasswordService]); function ResetPasswordService($q, $http, BASE_URL) { var temp = {}; this.changepassword = function(password, confirmpassword) { var deferred = $q.defer(); var param = 'password='+ password + '&confirmpassword=' +confirmpassword; $http({ method : 'PUT', url : BASE_URL.url+'/user/changepassword', 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; } } })(); |