Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

521 B
Raw Blame
import { Organization, teamListCall } from "@/components/networking";

export const fetchTeams = async (
  accessToken: string,
  userID: string | null,
  userRole: string | null,
  currentOrg: Organization | null,
) => {
  let givenTeams;
  if (userRole != "Admin" && userRole != "Admin Viewer") {
    givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null, userID);
  } else {
    givenTeams = await teamListCall(accessToken, currentOrg?.organization_id || null);
  }

  return givenTeams;
};