We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d33e7cc commit 1515705Copy full SHA for 1515705
1 file changed
app/graphJSON.server.ts
@@ -1,27 +1,5 @@
1
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
- });
+ return;
25
}
26
27
function graphJsonReplacer(key: string, value: any): any {
0 commit comments