forked from v4l3n71n/covas-bo
add groups enable and remove
This commit is contained in:
parent
9a4f17f469
commit
689cd27e73
@ -101,14 +101,14 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
||||
checkboxList = document.getElementsByClassName("checkboxList");
|
||||
for (var j=0; j<checkboxList.length; j++){
|
||||
if(checkboxList[j].checked){
|
||||
userid = checkboxList.getAttribute("userid");
|
||||
userid = checkboxList[j].getAttribute("userid");
|
||||
if (userid.length > 0){
|
||||
userids.push(userid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
param["userids"]=userids;
|
||||
param["ids"]=userids;
|
||||
|
||||
switch(e.currentTarget.id){
|
||||
case "disableUserButton":
|
||||
@ -118,7 +118,6 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
||||
case "removeUserButton":
|
||||
httpMethod = "delete";
|
||||
httpUrl = "users/groups?remove=true";
|
||||
param["remove"]=true;
|
||||
break;
|
||||
default:
|
||||
httpMethod = "patch";
|
||||
@ -128,7 +127,7 @@ instance.get("users", {withCredentials: true, params:param}).then(function(respo
|
||||
instance({
|
||||
method: httpMethod,
|
||||
url: httpUrl,
|
||||
params:param,
|
||||
data:param,
|
||||
withCredentials: true
|
||||
})
|
||||
.then(function(response){
|
||||
|
Loading…
x
Reference in New Issue
Block a user