diff --git a/static/js/users.js b/static/js/users.js index 5fefbe4..90286ec 100644 --- a/static/js/users.js +++ b/static/js/users.js @@ -34,6 +34,22 @@ sendHttpRequest("/api/auth/users/list", "POST", null, }, "application/json", `Bearer ${token}` ); +sendHttpRequest("/api/auth/roles/list", "POST", null, + function (error, response) { + if (error) console.error("Error:", error); + else { + console.log("JSON Response:", response); + const ls = JSON.parse(response); + + ls.data.forEach(row => { + const itemElement = document.createElement("div"); + itemElement.innerHTML = ``; + listerRoles.appendChild(itemElement); + }); + } + }, "application/json", `Bearer ${token}` +); + function invite() { const checkedRoles = Array .from(document.querySelectorAll('input[name="roles"]:checked'))