20 lines
497 B
JavaScript
20 lines
497 B
JavaScript
'use strict';
|
|
|
|
angular.module('warehost')
|
|
.controller('SettingsCtrl',function(session,config,$scope,$http){
|
|
$scope.obj = {};
|
|
$scope.submit = function(){
|
|
$http.post(config.api+'/password',$scope.obj).then(function(res){
|
|
session.set(res);
|
|
$scope.obj = {};
|
|
});
|
|
};
|
|
$scope.delete = function(){
|
|
if(window.confirm('realy delete your login and everything else on warehost?')){
|
|
$http.get(config.api+'/delete').then(function(res){
|
|
session.set(res);
|
|
});
|
|
}
|
|
};
|
|
});
|