mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Lots of small fixes and tweaks
This commit is contained in:
parent
0185e8238d
commit
d8e7693d8d
29 changed files with 185 additions and 67 deletions
|
@ -16,6 +16,13 @@
|
|||
return null;
|
||||
}
|
||||
|
||||
if (!isArray(permissions)) {
|
||||
permissions = [];
|
||||
}
|
||||
if (!isArray(features)) {
|
||||
features = [];
|
||||
}
|
||||
|
||||
var url = createBaseUrl(getBaseUrl(), '/usermanagement/createuser');
|
||||
|
||||
return $http({
|
||||
|
@ -38,6 +45,14 @@
|
|||
|
||||
var updateUser = function (id, permissions, features, alias, email) {
|
||||
|
||||
if (!isArray(permissions)) {
|
||||
permissions = [];
|
||||
}
|
||||
if (!isArray(features)) {
|
||||
features = [];
|
||||
}
|
||||
|
||||
|
||||
var url = createBaseUrl(getBaseUrl(), '/usermanagement/updateUser');
|
||||
return $http({
|
||||
url: url,
|
||||
|
@ -69,6 +84,10 @@
|
|||
return $('#baseUrl').text();
|
||||
}
|
||||
|
||||
function isArray(obj) {
|
||||
return !!obj && Array === obj.constructor;
|
||||
}
|
||||
|
||||
angular.module('PlexRequests').factory('userManagementService', ["$http", userManagementService]);
|
||||
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue