Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

299 B
Raw Blame
import fetchMock from "fetch-mock";

import type { ApiKey } from "metabase-types/api";

export function setupApiKeyEndpoints(apiKeys: ApiKey[]) {
  fetchMock.get("path:/api/api-key", apiKeys);
  fetchMock.get("path:/api/api-key/count", apiKeys.length);
  fetchMock.post("path:/api/api-key", 200);
}