var token = document.getElementById("form-token" ).value; const lister = document.getElementById("lister"); sendHttpRequest("/api/auth/users/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"); const rolesList = row.roles.map(row2 => `
  • [${row2.id}] ${row2.name}
  • `).join(""); const verificationList = row.verification.map(row2 => `
  • ${row2.type}: ${row2.verified}
  • `).join(""); itemElement.innerHTML = `
  • [${row.id}] ${row.username}
    Email: ${row.email}
    Phone: ${row.phone}
    Roles:
    Verification:
  • `; lister.appendChild(itemElement); }); } }, "application/json", `Bearer ${token}` );