build(ui): fix admin viewer issue

This commit is contained in:
Krrish Dholakia 2024-02-29 09:56:26 -08:00
parent d1f4c83c31
commit 034ca95a94
15 changed files with 88 additions and 20 deletions

View file

@ -175,7 +175,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
* If user is App Owner - use the normal spend logs call
*/
console.log(`user role: ${userRole}`);
if (userRole == "Admin") {
if (userRole == "Admin" || userRole == "Admin Viewer") {
const overall_spend = await adminSpendLogsCall(accessToken);
setKeySpendData(overall_spend);
const top_keys = await adminTopKeysCall(accessToken);