sum7/warehost-frontend
sum7
/
warehost-frontend
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
warehost-frontend/public/app/settings.js

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);
});
}
};
});