forked from phoenix/litellm-mirror
(ui) show user table on admin UI
This commit is contained in:
parent
6546b43e5c
commit
3a662539bd
4 changed files with 116 additions and 5 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue