diff --git a/src/client/src/AdminsOverview.js b/src/client/src/AdminsOverview.js
index 7016149..132da10 100644
--- a/src/client/src/AdminsOverview.js
+++ b/src/client/src/AdminsOverview.js
@@ -61,7 +61,7 @@ function AdminCreator(props){
}
function UserList(props){
- const deleteUsers = userId => {
+ const deleteUsers = (userId) => {
fetch(process.env.REACT_APP_API_URL + `/users/${userId}`, {method: "DELETE"})
.then(res => res.json())
.then(data => {
@@ -74,13 +74,12 @@ function UserList(props){
.catch(error => showError(error));
}
- let updateRank = (email) => event => {
+ let updateRank = (asuraId) => event => {
let isManager = event.target.value == "manager";
let formData = new FormData();
formData.append("isManager", isManager);
- formData.append("emailAddress", email);
let body = new URLSearchParams(formData);
- fetch(process.env.REACT_APP_API_URL + `/users/changeManagerStatus`, {
+ fetch(process.env.REACT_APP_API_URL + `/users/${asuraId}/changeManagerStatus`, {
method: "POST",
body: body
})
@@ -119,7 +118,7 @@ function UserList(props){
{user.email}
{/* TODO Drop down menu for selecting rank */}
-