diff options
| author | ArnaudVOTA <arnaud.vota@gmail.com> | 2016-02-03 12:05:04 +0100 |
|---|---|---|
| committer | ArnaudVOTA <arnaud.vota@gmail.com> | 2016-02-03 12:05:04 +0100 |
| commit | 0ea58c5684abc21c341b5a93befdd7cee4ac37e1 (patch) | |
| tree | 1c8fc4705fea9cecf7cc40c4d6e2af6f12b43d27 /client/js/requests/identity.js | |
| parent | 49109b657a3ae88d0df21d501647e71a2c955dcb (diff) | |
Ajout d'une requete pour l'identification. Non testé. Modification des champs de l'overlay.
Diffstat (limited to 'client/js/requests/identity.js')
| -rw-r--r-- | client/js/requests/identity.js | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index d008abf..aca435f 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -1,15 +1,36 @@ -// Make Namespace -var identity = {} ; +mainApp.controller('identityCtrl', function($scope, $http) { -// Fetch Status -identity.fetchStatus = function(){ - - // TODO + $scope.identityFormData = {}; + + $scope.processForm = function() { + + $http({ + method : 'POST', + url : 'http://148.60.11.31/', + data : $.param($scope.identityFormData), + headers : { 'Content-Type': 'application/x-www-form-urlencoded' } + }) + .success(function(data) { + console.log(data); + + if (!data.success) { + // if not successful, bind errors to error variables + //$scope.errorName = data.errors.name; + //$scope.errorSuperhero = data.errors.superheroAlias; + } else { + // if successful, bind success message to message + //$scope.message = data.message; + } + }); + }; + + + +}); - return new Array("0", "user1", "25/02/2016"); + -}
\ No newline at end of file |
