mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
fix tests
This commit is contained in:
@@ -42,7 +42,11 @@ const MetricsService = types
|
||||
headers: request.headers,
|
||||
body: ["GET", "HEAD"].includes(request.method) ? null : request.body,
|
||||
}
|
||||
self.env.KV_STORAGE.put(`metrics_events::${crypto.randomUUID()}`, JSON.stringify(event));
|
||||
if(self.env?.KV_STORAGE?.put) {
|
||||
self.env.KV_STORAGE.put(`metrics_events::${crypto.randomUUID()}`, JSON.stringify(event));
|
||||
} else {
|
||||
console.log("Detected metrics misconfiguration...not storing")
|
||||
}
|
||||
}
|
||||
}),
|
||||
}));
|
||||
|
Reference in New Issue
Block a user