Renamed id to asuraId

This commit is contained in:
Felix Albrigtsen 2022-04-23 14:51:58 +02:00
parent 8f78f3672e
commit 52514e9e68
1 changed files with 6 additions and 0 deletions

View File

@ -466,6 +466,8 @@ function getUsers () {
userRows.forEach((userRow, index) => {
let user = results=JSON.parse(JSON.stringify(userRow))
user.isManager = user.isManager == 1;
user.asuraId = user.id;
user.id = undefined;
users.push(user);
});
resolve(users);
@ -485,6 +487,8 @@ function getUserByGoogleId(googleId) {
reject("No such user exists");
}
users[0].isManager = users[0].isManager == 1;
users[0].asuraId = users[0].id;
users[0].id = undefined;
resolve(users[0]);
}
});
@ -503,6 +507,8 @@ function getUserByEmail(email) {
return;
}
users[0].isManager = users[0].isManager == 1;
users[0].asuraId = users[0].id;
users[0].id = undefined;
resolve(users[0]);
}
});