MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / action

Function action

apps/webapp/app/routes/api.internal.stripe_webhooks.ts:12–35  ·  view source on GitHub ↗
({ request }: ActionFunctionArgs)

Source from the content-addressed store, hash-verified

10 stripe trigger price.created
11*/
12export async function action({ request }: ActionFunctionArgs) {
13 const body: any = await request.json();
14
15 const response = await fetch("https://jsonhero.io/api/create.json", {
16 method: "POST",
17 headers: {
18 "Content-Type": "application/json",
19 },
20 body: JSON.stringify({
21 title: body.type,
22 content: {
23 ...body,
24 example: { id: body.type, name: body.type, icon: "stripe", payload: body.data.object },
25 },
26 readOnly: true,
27 }),
28 });
29
30 const json: any = await response.json();
31
32 console.log({ [body.type]: json.location });
33
34 return json;
35}

Callers

nothing calls this directly

Calls 3

jsonMethod · 0.80
logMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…