Skip to content

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

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

import type { EmbedDataset, PublicCard } from "metabase-types/api";

export function setupPublicQuestionEndpoints(
  uuid: string,
  publicCard: PublicCard,
) {
  fetchMock.get(`path:/api/public/card/${uuid}`, publicCard);
}

export function setupPublicCardQueryEndpoints(
  uuid: string,
  publicDataset: EmbedDataset,
) {
  fetchMock.get(`path:/api/public/card/${uuid}/query`, publicDataset);
}