MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / getOffers

Function getOffers

packages/web/src/app/api/(client)/client.ts:235–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

233}
234
235export const getOffers = async (): Promise<OffersResponse | ServiceError> => {
236 const url = new URL("/api/offers", window.location.origin);
237
238 const result = await fetch(url, {
239 method: "GET",
240 headers: {
241 "X-Sourcebot-Client-Source": "sourcebot-web-client",
242 },
243 }).then(response => response.json());
244
245 return result as OffersResponse | ServiceError;
246}
247
248export const connectMcpToAsk = async (body: { serverId: string; returnTo?: string }): Promise<ConnectMcpResponse | ServiceError> => {
249 const result = await fetch('/api/ee/askmcp/connect', {

Callers 1

useOffersFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected