We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 357da93 commit 82feb43Copy full SHA for 82feb43
bin/worker.js
@@ -1,7 +1,7 @@
1
-import { reportRequestMetric } from '../lib/influx.js'
+import { reportRequestMetric as defaultReportRequestMetric } from '../lib/influx.js'
2
3
export default {
4
- async fetch(request, env, ctx, { reportRequestMetric } = { reportRequestMetric }) {
+ async fetch(request, env, ctx, { reportRequestMetric = defaultReportRequestMetric } = {}) {
5
const response = await fetch(request)
6
ctx.waitUntil(reportRequestMetric(request, env))
7
return response
0 commit comments