mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Small changes including #666
This commit is contained in:
parent
39888a4b94
commit
f73d12e095
7 changed files with 38 additions and 47 deletions
|
@ -136,15 +136,15 @@
|
|||
$scope.deleteUser = function () {
|
||||
var u = $scope.selectedUser;
|
||||
userManagementService.deleteUser(u.id)
|
||||
.then(function sucess(data) {
|
||||
if (data.data.result) {
|
||||
removeUser(u.id, true);
|
||||
closeSidebar();
|
||||
return successCallback("Deleted User", "success");
|
||||
}
|
||||
}, function errorCallback(response) {
|
||||
successCallback(response, "danger");
|
||||
});
|
||||
.then(function sucess(data) {
|
||||
if (data.data.result) {
|
||||
removeUser(u.id, true);
|
||||
closeSidebar();
|
||||
return successCallback("Deleted User", "success");
|
||||
}
|
||||
}, function errorCallback(response) {
|
||||
successCallback(response, "danger");
|
||||
});
|
||||
}
|
||||
|
||||
$scope.formatDate = function (utcDate) {
|
||||
|
@ -159,6 +159,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
$scope.closeSidebarClick = function() {
|
||||
return closeSidebar();
|
||||
}
|
||||
|
||||
function removeUser(id, current) {
|
||||
$scope.users = $scope.users.filter(function (user) {
|
||||
return user.id !== id;
|
||||
|
@ -182,4 +186,4 @@
|
|||
|
||||
|
||||
angular.module('PlexRequests').controller('userManagementController', ["$scope", "userManagementService", "moment", controller]);
|
||||
}());
|
||||
} ());
|
Loading…
Add table
Add a link
Reference in a new issue