Skip to content

Commit 1515705

Browse files
authored
Update graphJSON.server.ts
Stop sending events go graphJSON
1 parent d33e7cc commit 1515705

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

app/graphJSON.server.ts

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
export async function sendEvent(event: Record<string, any>): Promise<void> {
2-
if (
3-
typeof GRAPH_JSON_API_KEY === "undefined" ||
4-
typeof GRAPH_JSON_COLLECTION === "undefined"
5-
) {
6-
return;
7-
}
8-
9-
const payload = {
10-
api_key: GRAPH_JSON_API_KEY,
11-
collection: GRAPH_JSON_COLLECTION,
12-
json: JSON.stringify(event),
13-
timestamp: Math.floor(new Date().getTime() / 1000),
14-
};
15-
16-
console.log(
17-
`[GraphJSON] Sending event: ${JSON.stringify(payload, graphJsonReplacer)}`
18-
);
19-
20-
await fetch("https://api.graphjson.com/api/log", {
21-
method: "POST",
22-
headers: { "Content-Type": "application/json" },
23-
body: JSON.stringify(payload),
24-
});
2+
return;
253
}
264

275
function graphJsonReplacer(key: string, value: any): any {

0 commit comments

Comments
 (0)