Skip to content

Commit 6ee4c10

Browse files
committed
Code cleanup
1 parent fa12006 commit 6ee4c10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ async function handleConversionLog(request: Request<unknown, IncomingRequestCfPr
5353

5454
// Clone and log request asynchronously
5555
if (loggingEnabled) ctx.waitUntil(Promise.all([
56-
env.LZ_R2_BUCKET.put(requestID + `/in.${sourceFormat}`, request.clone().body, {httpMetadata:{contentType:getContentType(sourceFormat)}}),
57-
env.LZ_R2_BUCKET.put(requestID + '/params.json', url.searchParams.get('params'), {httpMetadata:{contentType:'application/json'}})
56+
env.LZ_R2_BUCKET.put(`${requestID}/in.${sourceFormat}`, request.clone().body, {httpMetadata:{contentType:getContentType(sourceFormat)}}),
57+
env.LZ_R2_BUCKET.put(`${requestID}/params.json`, url.searchParams.get('params'), {httpMetadata:{contentType:'application/json'}}),
5858
]));
5959

6060
// Generate response
6161
const response = await proxyRequestToBackend(request, url, env, requestID);
6262

6363
// Clone and log response asynchronously
6464
if (loggingEnabled) ctx.waitUntil(
65-
env.LZ_R2_BUCKET.put(requestID + `/out.${targetFormat}`, response.clone().body, {httpMetadata:{contentType:getContentType(targetFormat)}})
65+
env.LZ_R2_BUCKET.put(`${requestID}/out.${targetFormat}`, response.clone().body, {httpMetadata:{contentType:getContentType(targetFormat)}})
6666
);
6767

6868
// Return response to client

0 commit comments

Comments
 (0)