User profile editing and password
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
(function() {
|
||||
window.app.factory("profileSvc",
|
||||
[
|
||||
"$http",
|
||||
function($http) {
|
||||
var profile = {};
|
||||
|
||||
loadProfile();
|
||||
|
||||
var svc = {
|
||||
update: update,
|
||||
profile: profile
|
||||
};
|
||||
|
||||
return svc;
|
||||
|
||||
function loadProfile() {
|
||||
$http.post("/Profile/Get")
|
||||
.success(function(data) {
|
||||
angular.copy(data, profile);
|
||||
});
|
||||
}
|
||||
|
||||
function update(updatedProfile) {
|
||||
return $http.post("/Profile/Update", updatedProfile)
|
||||
.success(function(data) {
|
||||
angular.copy(data, profile);
|
||||
});
|
||||
}
|
||||
}
|
||||
]);
|
||||
})();
|
||||
Reference in New Issue
Block a user