(ui) show user table on admin UI

This commit is contained in:
ishaan-jaff 2024-02-20 15:34:10 -08:00
parent 6546b43e5c
commit 3a662539bd
4 changed files with 116 additions and 5 deletions

View file

@ -104,14 +104,19 @@ export const keyDeleteCall = async (accessToken: String, user_key: String) => {
export const userInfoCall = async (
accessToken: String,
userID: String,
userRole: String
userID: String | null,
userRole: String,
viewAll: Boolean = false
) => {
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/user/info` : `/user/info`;
if (userRole == "App Owner") {
if (userRole == "App Owner" && userID) {
url = `${url}/?user_id=${userID}`;
}
console.log("in userInfoCall viewAll=", viewAll);
if (viewAll) {
url = `${url}/?view_all=true`;
}
message.info("Requesting user data");
const response = await fetch(url, {
method: "GET",