Skip to content

Commit 82feb43

Browse files
pyropyjuliangruber
andauthored
Update bin/worker.js
Co-authored-by: Julian Gruber <[email protected]>
1 parent 357da93 commit 82feb43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { reportRequestMetric } from '../lib/influx.js'
1+
import { reportRequestMetric as defaultReportRequestMetric } from '../lib/influx.js'
22

33
export default {
4-
async fetch(request, env, ctx, { reportRequestMetric } = { reportRequestMetric }) {
4+
async fetch(request, env, ctx, { reportRequestMetric = defaultReportRequestMetric } = {}) {
55
const response = await fetch(request)
66
ctx.waitUntil(reportRequestMetric(request, env))
77
return response

0 commit comments

Comments
 (0)