admin: add a route and buttons to generate/delete fichtpasswd, if needed
This commit is contained in:
parent
590522e7ed
commit
e945071a10
3 changed files with 36 additions and 0 deletions
|
@ -682,6 +682,20 @@ angular.module("FICApp")
|
|||
$rootScope.newBox('danger', 'An error occurs when generating certificate:', response.data.errmsg);
|
||||
});
|
||||
};
|
||||
$scope.generateHtpasswd = function() {
|
||||
$http.post("/api/htpasswd").then(function() {
|
||||
$rootScope.newBox('success', 'Fichier htpasswd généré avec succès');
|
||||
}, function(response) {
|
||||
$rootScope.newBox('danger', 'An error occurs when generating htpasswd file:', response.data.errmsg);
|
||||
});
|
||||
};
|
||||
$scope.removeHtpasswd = function() {
|
||||
$http.delete("/api/htpasswd").then(function() {
|
||||
$rootScope.newBox('success', 'Fichier htpasswd supprimé avec succès');
|
||||
}, function(response) {
|
||||
$rootScope.newBox('danger', 'An error occurs when deleting htpasswd file:', response.data.errmsg);
|
||||
});
|
||||
};
|
||||
})
|
||||
|
||||
.controller("PublicController", function($scope, $rootScope, $routeParams, $location, Scene, Theme, Teams, Exercice) {
|
||||
|
|
Reference in a new issue