User profile editing and password

This commit is contained in:
2016-09-26 11:13:59 -04:00
parent 6789c1b3b5
commit 75b7c02979
54 changed files with 373 additions and 209 deletions
+10 -7
View File
@@ -1,5 +1,7 @@
(function () {
window.app.factory('userSvc',
(function() {
window.app.factory("userSvc",
[
"$http",
function($http) {
var users = [];
@@ -15,28 +17,29 @@
return svc;
function loadUsers() {
$http.post('/User/All')
$http.post("/User/All")
.success(function(data) {
users.addRange(data);
});
}
function exportusers() {
return $http.post('/User/Export', {}, { responseType: 'arraybuffer' });
return $http.post("/User/Export", {}, { responseType: "arraybuffer" });
}
function create(user) {
return $http.post('/User/Create', user)
return $http.post("/User/Create", user)
.success(function(user) {
users.unshift(user);
});
}
function edit(existingUser, editedUser) {
return $http.post('/User/Edit', editedUser)
return $http.post("/User/Edit", editedUser)
.success(function(user) {
angular.copy(user, existingUser);
});
}
});
}
]);
})();