From ba15613417a7251499cfa01f12148df7a8109f4a Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 11 Jun 2015 23:36:26 +0300 Subject: [PATCH] Angularjs: Added new Service sendValidationMail Service --- templates/js/services/apiService.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index b794224..e240375 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -22,6 +22,20 @@ service.factory('apiService', ['$http', function($http) { url : url }; + return $http(req); + }, + sendValidationMail: function(token, email){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/validation/sendmail/" + token; + payload = { + email: email + }; + + req = { + method: "POST", + url: url, + data: payload + }; + return $http(req); }